How do I use a random to...?

Get help using Construct 2

Post » Wed Dec 10, 2014 8:04 pm

Hey
i seen some vids on youtube but what i want is not the random or the choose..
i want something to spawn a sprite in for example (5,10) (10,20) (45, 80)... and so on... it needs to be those specific points .... seems that with choose it will randomly do like (5,80) when i do not want that :/ hope you can help :)
Ty xxx
B
3
Posts: 5
Reputation: 185

Post » Wed Dec 10, 2014 8:30 pm

There are a few ways you can accomplish this.

If the points are very specific, for example set by hand, you could use an Array or spawner sprite.

- The Array Way
Image

-The spawner object way
Image

The spawner object is easier, but more resource intensive. You simply put the spawner objects where they need be.

You could also use math, by taking into account the first random generated number to generate the second, but it all depends on what you want.

If this doesn't make sense to you or if you wanted to place the sprites yet another way, let me know.
B
18
S
4
G
3
Posts: 30
Reputation: 4,088

Post » Wed Dec 10, 2014 8:40 pm

ye... like i want to click on the object.. and spawn it in a random place but it needs to be in one of 5 "boxes"... not sure thats the way of doint it
B
3
Posts: 5
Reputation: 185

Post » Wed Dec 10, 2014 10:10 pm

tyyy i did here's how i did it
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 5
Reputation: 185


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Google [Bot], tarek2 and 10 guests