Spawn & move actor
wannadude
Member Posts: 3
How do i spawn a actor every 5 seconds and let the spawned actor move to the right?
And then how do i let the spawned actor disappear outside of the screen? (When it was moved to the right)
Thanks.
And then how do i let the spawned actor disappear outside of the screen? (When it was moved to the right)
Thanks.
Comments
Timer every 5 seconds
Spawn actor [actor name]
Spawned actor
Move [direction: 0] [speed: 100 or 200 or whatever]
The actor will automatically "disappear" when it moves beyond the screen boundary. If you want, you can add a rule to destroy it when its self.position.x value is greater than the scene width.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
And also the problem right now is that they only spawn if i have already an actor in game?
If you want to spawn the actor and then have it wait a few seconds and then have it more, just add a timer to the spawned actor, set to "AFTER x seconds" and put the move behaviour inside it.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Rule:
If Attribute game.y >= 1
Do:
Timer Every game.y seconds
Spawn Actor x
Change Attribute game.y to game.y-1
Else:
Timer Every random(0.1,2) seconds
Spawn Actor x