Spawn actor help
agueis
Member Posts: 420
Hello , I have a condition for the hero, each time that game.position.x > =450 spwan actor, all well but when the hero returns to a game.positionx <450 , then its position is >= 450 appear spanw actor 2, then 3, etc, how do I get that there is only a spawn actor?, thanks.
Comments
Hi @agueis If you mean you only want the spawn to happen once then use something like the following (one way to handle it): make an integer attribute called Trigger
In your actor hero, put in its rules:
Rule: When Position >= 400
When Attribute Trigger =0
Change Attribute Trigger to 1
Otherwise
When Attribute Trigger =1
Change Attribute Trigger to 2
Rule: When Attribute Trigger = 1
Spawn
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Exactly the same as I suggested except with one crucial difference: if you've got your spawn happening when count is 1, it'll always happen every time your hero goes past 400 with your way… I thought I understood from your question you only wanted the spawn to happen once, hence changing the attribute to 2 in my version to avoid this.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
So it's identical then; glad to know we're thinking on the same lines, shame I wasted my time when you knew the answer to your own question… ;-) (You say "count" and I say "Trigger"… :P )
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps