Hello!
Anyone know a way to do the following?
on HandlerName
delete me
end HandlerName
Usually, I do this:
---------------------------------
In Object
on ObjectHandler
put the long id of me into tObject
send "DeleteObject tObject" to card "My Card" in 20 milliseconds
end ObjectHandler
----------------------------------
On the Card
on DeleteMe pObjectID
delete pObjectID
end DeleteMe
-----------------------------------
... or something close to that. However, in this case, my cards will not have the DeleteMe handler on them, hence wanting to "delete me in 20 milliseconds" from the object's own script.
Thanks!
Phil E.
Deleting Object from within its own Script
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Deleting Object from within its own Script
i usually do the same and put the deleteme script in the main stack so all cards and objects can access it. mine is setup for deleting single objects as well as sequentially numbered objects
Re: Deleting Object from within its own Script
Hi Phil,
you can actually do something like this:
and the stack (the engine!) knows what to do and will do it!
Best
Klaus
you can actually do something like this:
Code: Select all
on mouseup
put the long ID of me int tID
send "delete tID" to this stack in 20 millisecs
end mouseup

Best
Klaus
Re: Deleting Object from within its own Script
Klaus,
That's awesome! I didn't realize it accepted a parameter. That's just what I'm looking for; nice and universal.
Thank you both for your responses!
Phil E.
That's awesome! I didn't realize it accepted a parameter. That's just what I'm looking for; nice and universal.
Thank you both for your responses!
Phil E.