16 Squares to initialize

Get help using Construct 2

Post » Thu Mar 29, 2012 3:12 pm

Hi
I have 16 sprites of type 'square'
I have created an instance variable for this type, named 'monster'
I would like to initialize each square.monster with a different value
I try to do a loop but I can't get the action to write my expression :

square(loopindex).monster=random(2,9)

how can I do ?

thx
Fabien
B
3
Posts: 8
Reputation: 316

Post » Thu Mar 29, 2012 4:49 pm

You don't need loop if you want to add it to all instances, just add action - square - Set monster to random(2,9)
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643


Return to How do I....?

Who is online

Users browsing this forum: alextro, MarkStockley and 0 guests