@gyroscope: make sure NO code is in any the instances!!! Make sure ALL code is only in the Prototypes when you are starting out...
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
OK, thanks firemaplegames. I was thinking that if actor "x" and actor "y" were Instances of the same Prototype, then asking the Prototype to destroy itself would destroy both Instances?
Once you drag an instance of the prototype out into the Scene, it becomes it's own entity. One instance does not affect another.
The Rules and behaviors of an instance only apply to that instance.
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
Sure thing, thanks; that's why I suggested to make sure the destroy "me" in the Rules of actor "x" was in its Instance, if actor "y" was another instance of the same Prototype. But that last bit I didn't mention, in my post to lowski...so sorry to have mislead you as to what I meant!
Sorry, I needed the same help however I don't understand how to create a Global Game Attribute. Please help, thanks!
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
Hi Nawee, very straightforward. Go to the Scene Editor (any scene); there's the Inspector on the left hand side; Two buttons, Game and Scene, make sure it's in Game; 3 buttons underneath, 2nd button is Attributes; just click the + like you do adding to Scene or Actor attributes.
Comments
Create a global game attribute: Call it ActorXDestroyed, set by default to false
Within Actor X, Create a Rule that states when the actor is destroyed:
ie: Rule: When actor overlaps with enemy:
Change attribute ActorXDestroyed to true
Timer: After 0.1 seconds: Destroy this actor
Then in Actor Y Create a rule that says:
When game.ActorXDestroyed is true:
Destroy this actor
Hope this helps!
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
The Rules and behaviors of an instance only apply to that instance.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Thanks for the other clarifications as well
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Thanks, Nawee