destroy multiple actors.
Gnarly
canadaMember Posts: 840
Still learning game salad.
I can make a rule to when an actor is touched it will be destroyed. How do you program when an actor is touched multiple actors are destroyed???
Comments
Hello @gattoman Make a boolean, let's call it Destroyed
In each and every actor you want to be destroyed at the same time, add the Rule:
And when you want this to happen, say with a button, put it into its rules:
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Thank you. I understand basic. programming. It would be easier for me to do this in code. I am trying to learn how to "code" in gamesalad.
I will try this out.
Very helpful.
Thanks!!
I tried and worked great. Thanks
You're welcome.
I am trying to learn how to "code" in gamesalad.
And for the record, as one of GameSalad's selling points is "Create Games Rapidly
Drag & Drop, No Code" the majority of users call putting together the ready-made lumps of code as programming. (Despite GS telling us there isn't any coding to do, a few users still call it coding - bit illogical on their part, I always think...)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
This logic of taking a Boolean seems very lame to me. If there are 20 instance of an object and they share same variable to die, but you want to only 3 to die, how is it going to work? It will kill all 20.
allocate a cell in a table to each of the 20 instances (which effectively makes it work like an array). if the cell value corresponding to the actor meets a condition, destroy it.
When selling it, I try to differentiate "code" from "programming". You're programming and to an extent you're coding (expressions are really lua expressions with some special sauce for referencing our attribute system). But it's not "coding" in the traditional textual syntax sense.