|
Catdaddy12 Towradgi
Registered User
Join date: 22 Jun 2006
Posts: 4
|
08-04-2006 15:28
I would like to delete all the note cards in an objects inventory with a script how would i do this??
|
|
Peter Lameth
Registered User
Join date: 27 Sep 2005
Posts: 28
|
08-04-2006 15:31
well it would be some variation of llRemoveInventory(name); i'd think
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
08-04-2006 15:43
default { state_entry() { while ( llGetInventoryNumber( INVENTORY_NOTECARD ) > 0 ) { llRemoveInventory( llGetInventoryName( INVENTORY_NOTECARD, 0 ) ); } } }
Something to get you started. Try that on a test prim first, in case it deletes stuff you didn't want deleted 
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
08-04-2006 15:46
yup, get the number of notecards, cycle through them all removing one at a time with llRemoveInventory.
There are two ways to go, start high and work down, or remove the 0-th one each time.
llGetInventoryNumber(INVENTORY_NOTECARD) and llGetInventoryName(INVENTORY_NOTECARD, {number}) are also your friends here.
|
|
Catdaddy12 Towradgi
Registered User
Join date: 22 Jun 2006
Posts: 4
|
Genius
08-04-2006 16:10
FRIGGIN GENIUS GUYS THANKS MAN I DID'NT THINK of the while loop OH WELL GOOD JOB ON HELPING ME
-- COOKIE!?
|