At 15:38 +0000 01_04_26, Christian Wach wrote:
>Jakob Hede Madsen wrote:
>
>> There is nothing spooky about it, it will happen anytime you delete
>> items from a linear list during forward traversal
>
>ah - I see what you mean... I thought it might be something
>peculiar to the actorList.
>
>I'll have to think about what I'm going to do with all those
>(the actorList).deleteOne(me)s... still on D7, so no timeOut
>objects to migrate to. Guess I'll have build an event object.
>been meaning to for ages for those tempo-independent movies.
>I guess I have the reason to do this now.
You can teach your objects to leave the actorList in a polite way,
where they relay the stepFrame event to the next object:
on stepFrame me
if not deathwish then return
thePos = (the actorList).getPos(me)
if thePos < 1 then return
(the actorList).deleteAt(thePos)
if thePos > (the actorList).count() then return
-- politely relay event to next object --
call #stepFrame, (the actorList)[thePos]
end
Jakob
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]