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
20
S
8
Posts: 23
Reputation: 1,488

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
49
S
24
G
107
Posts: 1,581
Reputation: 60,303

Post » Sat Apr 02, 2016 2:26 pm

hi tks! i got it
B
20
S
8
Posts: 23
Reputation: 1,488


Return to How do I....?

Who is online

Users browsing this forum: ivanski1983, marcoscodas, Yahoo [Bot] and 13 guests