Touch spawn consecutive actors and random actors
I am playing with thetouch spawn actor demo. I would like to spawn random blocks and incremental blocks as in blue, green, orange for example.
I created a pick a block integer and made rules for the spawn, yet I am just getting the first block only. Anyone do this before.
I created a pick a block integer and made rules for the spawn, yet I am just getting the first block only. Anyone do this before.
Comments
next make a actor, uncheck visible under its graphic attributes so it becomes invisible, and resize so it covers your scene or wherever you want to be able to touch and spawn.
In that actor have a rule when touch is pressed, change attribute randomBlock to random(1,4)
(replace the 4 in the random expression to however many actors you have to choose between to spawn.
Then have a rule when randomBlock=1 , spawn actor 1
another rule when randomBlock=2, spawn actor 2
and so on