How do I spawn an object randomly to another objects?

Get help using Construct 2

Post » Tue Dec 15, 2015 8:26 pm

An object is going to spawn other objects randomly.How can i do that?
B
27
S
13
G
1
Posts: 130
Reputation: 3,058

Post » Tue Dec 15, 2015 9:41 pm

Randomly in what way? In position? In time? In color? In orientation?
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Wed Dec 16, 2015 11:25 am

gumshoe2029 wrote:Randomly in what way? In position? In time? In color? In orientation?


i mean i have 5 floor pieces and a bomb object.I want to set bomb's position every x seconds same with random floor pieces.

Image
B
27
S
13
G
1
Posts: 130
Reputation: 3,058

Post » Wed Dec 16, 2015 8:31 pm

Sorry, I did not understand. You want to randomly move the bomb every X seconds, or spawn random floor parts ?

If it's moving the bomb to a random position, it's something like that :
Every X seconds => Set bomb position to X(random(x1, x2) and Y(random(y1, y2) with x1, 2 and y1, 2, being the intervals.

If you provide a small capx, we should show you more precisely.
B
14
S
4
Posts: 109
Reputation: 1,281

Post » Wed Dec 16, 2015 9:41 pm

Nabu0001 wrote:Sorry, I did not understand. You want to randomly move the bomb every X seconds, or spawn random floor parts ?

If it's moving the bomb to a random position, it's something like that :
Every X seconds => Set bomb position to X(random(x1, x2) and Y(random(y1, y2) with x1, 2 and y1, 2, being the intervals.

If you provide a small capx, we should show you more precisely.



I want to move the bomb every x seconds to floor parts but not according to a particular sequence.When the bomb moved to random floor part,the floor part will be destroyed.After this,the bomb will move to any other random floor and destroy it.That's what i want.I hope i can told this time.
B
27
S
13
G
1
Posts: 130
Reputation: 3,058

Post » Sat Dec 19, 2015 9:37 pm

Sorry for the delay. Ok, you want your bomb to suddenly appear on top of a random floor tile ? Or you want it to move until it reaches the tile ?
Can you post a link to you capx project ?
B
14
S
4
Posts: 109
Reputation: 1,281


Return to How do I....?

Who is online

Users browsing this forum: lukewasthefish, marc254, Mayfly, Yahoo [Bot] and 18 guests