toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Spawn Actor (Finished)
Mathiashelseth99
Member
Posts:
37
July 2013
edited July 2013
in
Working with GS (Mac)
Hi i wonder if it is possible to only spawn one actor in a random time???
Comments
ORBZ
Member
Posts:
1,304
July 2013
edited July 2013
sure
game variable: spawnCount (integer)
inside the spawning actor add this behavior:
Timer: after random(0,5) // that's 0 to 5 seconds
rule when spawnCount < MAX (in your case MAX=1)
- spawn Actor
inside the spawned actor add this behavior:
change attribute game.spawnCount = game.spawnCount + 1
Mathiashelseth99
Member
Posts:
37
July 2013
Thanks
Mathiashelseth99
Member
Posts:
37
July 2013
How do you then add text and sounds when the actor comes up?
Sign In
or
Register
to comment.
Comments
game variable: spawnCount (integer)
inside the spawning actor add this behavior:
Timer: after random(0,5) // that's 0 to 5 seconds
rule when spawnCount < MAX (in your case MAX=1)
- spawn Actor
inside the spawned actor add this behavior:
change attribute game.spawnCount = game.spawnCount + 1