How do I spawn an object randomly to another objects?

  • An object is going to spawn other objects randomly.How can i do that?

  • Randomly in what way? In position? In time? In color? In orientation?

  • 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.

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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 ?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)