how to have random spawn not spawn on top of main actor
Cee3pee0
Member, PRO Posts: 194
Is there an easy-ish way to have the "bad guy" actor not spawn on top of the main actor when it is set to spawn in a random x,y position? thanks in advance
Comments
That's it in a nutshell, anyway. Think it's right, and hope it helps.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I created a self boolean attribute in my enemy actor called self.active. then this rule:
Rule
when self.time=2 (or whatever time you like)
change self.active to 1
Then wrap all of your rules for this actor in a rule that says when self.active is true.
Then put an interpolate behavior before the self.active is true rule (not in it) and interpolate the alpha to 1. Be sure to change the alpha to zero in the actor panel on the left side of the screen. What this will do is cause the actor to be spawned and slowly fade in. The actor will not be active and will not hurt your player (assuming rules for hurting the player are in the enemy actor and not the main player actor) until self.active is true.
So from the gamer's prospective if an enemy is spawned under the main player there will be 2 seconds to get away from the enemy as it fades in. This is essentially how it is done in tilt to live where the new red dots do not hurt for the first .5 seconds or so.