how can spawn 1 actor
have problem with cannon ball games.. i need the cannon to spawn only 1 ball.
how can i stop the spam click to spawn ball
how can i stop the spam click to spawn ball
Best Answer
-
akstudiodevelopment Posts: 93
Do you mean, even though a ball has been spawned, you can keep firing more?
Have a game boolean attribute perhaps "Ball_Alive" and set it to false, then inside the ball, have:
change attribute "Ball_Alive" to True.
Within the rule set for destroying the ball, add a Change Attribute "Ball_Alive" to False, followed by Destroy Actor...
Now, What ever the mechanic is used to trigger the ball to shoot, add in:
When Touch is pressed (or mouse button is down) & Attribute "Ball_Alive" = false; then
this is the part where you would have the mechanic to say spawn Ball or change an attribute...
Hope this helps??
Answers
- Ball -
*Accelerate *
Directrion: 0 Relative to: Actor
Aceeleration: 6000
*Rule*
Attribute :Game.ball_Alive... is True
Change Attribute:Game.ball_Alive..to False
Destroy
-Cannon-
*Rule*
Actor Receives event Mouse button is down
Attribute: Game.Ball_alive is false
-Spaw actor-
---------------------------------------
when ever mouse button is down cannon spawn balls, where is the trick to stop spawn balls?only one ball i need spawn.