View Single Post
Super Moderator
x2495iiii's Avatar
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 05-04-2010, 10:45 PM

Originally Posted by jediaction View Post
no, sorry
Wrong. It can be done, you just have to look for it.

Drag the list onto the scripting area and you'll have the option to make a "Remove item from position [index] of [name of list]" method. Choose any index you want so the method will be created. Then, drag the list onto the index variable, and one of the options will be "First index of..." Using this, you can look for the first occurrence of a certain object. By combining it with the remove item method, you have a method which scans the list to see where the object is, then removes it accordingly.

I included a world with an example of the code I described.
Attached Files
File Type: a2w AskandRemove.a2w (1.16 MB, 13 views)

Reply With Quote