How do I create random objet at "point" with random time

Get help using Construct 2

Post » Sat Apr 02, 2016 5:51 am

eg i have 3 points * * * in layout and how to make each point create random objet in every x second.
i want make the points is like a hole will spawn a item bonus or enemy or a bomb. At x second maybe point number 1 and point number 3 create item bonus and at the same point number 2 create bomb.
sorry my bad english.
B
22
S
8
Posts: 26
Reputation: 1,544

Post » Sat Apr 02, 2016 6:16 am

If you have access to families, put all the spawn items in one family -
Code: Select all
System - For Each PointObject |  PointObject - Spawn ItemFamily
System - Every X seconds      |
 


If you don't have access to families, create a variable SpawnItem=0 -

Code: Select all
System - For Each PointObject | Set SpawnItem to choose(1,2,3,ect...)
System - Every X seconds      |
       If SpawnItem = 1          | Create SpawnObject1 at PointObject.X, PointObject.Y
       If SpawnItem = 2          | Create SpawnObject2 at PointObject.X, PointObject.Y
       If SpawnItem = 3          | Create SpawnObject3 at PointObject.X, PointObject.Y
       ect....
Mistakes were made.
B
62
S
30
G
134
Posts: 1,973
Reputation: 75,473

Post » Sat Apr 02, 2016 2:26 pm

hi tks! i got it
B
22
S
8
Posts: 26
Reputation: 1,544


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 64 guests