random ennemy
keekee312
Member Posts: 91
Hi, i have an new problem, with random spawning.
I have 6 squares of different colors (in a tag called CARRE), and i want them to be spawn random but at the same location when they touch the ground (like in tetris).
I have an attribute called choose (integer) and an actor which is invisble and on the ground with the following rules :
when actor collides with CARRE (tag)
=> Change attribute : game.choose to random(1,6)
OTHER RULE :
if game.choose = 1
spawn the blue square
if game.choose = 2
spawn the red square
ETC..
And i don't know what it does, sometimes just 2 squares falls down, sometimes 6, sometimes it seems to work (8 squares or more)
I have 6 squares of different colors (in a tag called CARRE), and i want them to be spawn random but at the same location when they touch the ground (like in tetris).
I have an attribute called choose (integer) and an actor which is invisble and on the ground with the following rules :
when actor collides with CARRE (tag)
=> Change attribute : game.choose to random(1,6)
OTHER RULE :
if game.choose = 1
spawn the blue square
if game.choose = 2
spawn the red square
ETC..
And i don't know what it does, sometimes just 2 squares falls down, sometimes 6, sometimes it seems to work (8 squares or more)