Thanks Spooner (esp. for checking back for the edit).
![Smiley :)](http://www.ofpec.com/forum/Smileys/NewSet/smiley.gif)
WRT the addaction index, yeah, in a "regular" addaction, it returns the index, which is placed in a variable by using the:
index = player addaction blah blah blah
While looking at your array, I think I see my conceptual problem. You are making the index the value of the array.
So, let's say the first addaction starts at index 3.
My thought was that:
the addaction command would return the value 3, to be stored in addedaction
addedaction [1] = 3
(next iteration)
addedaction [2] = 4
and so on, so the removeaction addedaction[1] would be read as removaction 3
What it appears from your suggestion is:
addaction returns 3, stored in index
addedaction[index] would be addedaction[3] for the first one, then addedaction [4] and so on
So, then the removeaction for/each loop just looks at what the values are for each added action?
![Cheesy :D](http://www.ofpec.com/forum/Smileys/NewSet/cheesy.gif)
Dynamically creating the variable name, for some reason, made more sense to me in an iterative way.
![Smiley :)](http://www.ofpec.com/forum/Smileys/NewSet/smiley.gif)
It seemed "cleaner" somehow.
But, after getting into this a bit more, (thanks to you guys) I think the array is really the better way to go.
Sorry to belabor the point. It has been WAY too long since I studied programming in any conventional setting. It really helps it "stick" when I understand things.
(One point about the removaction. Should it be?
{player removeaction _x} forEach addedaction};
Or, for that matter, a variable instead of player?
Thanks SO much, again.