How do I Create Object on random Spawn Location Object

Get help using Construct 2

Post » Tue Jun 09, 2015 11:31 am

Basically what I want to do is this,
1. Pre-mark a bunch of spawn locations on my map.
2. If there is 500 spawn locations, I would like to random maybe 10-15 locations can create objects at a time
3. The create on object should be random.

I have been trying to figure out the best way to do this, I was thinking via UID's but does not seem like you can create object on UID's or?

If anyone has any idea's, please share. Thank you.


https://www.dropbox.com/s/x4575lcqw536e ... .capx?dl=0
B
9
S
1
Posts: 56
Reputation: 576

Post » Tue Jun 09, 2015 2:23 pm

Give the locations and the objects different IDs. Just add a variable to the object with the name ID or any other thing like that.

Base your spawns and locations on the ID's you gave your objects.
B
17
S
7
Posts: 277
Reputation: 2,514

Post » Tue Jun 09, 2015 4:17 pm

Make an array of 500 locations, then do:

Array.At(random(Array.Width))
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,414
Reputation: 4,822

Post » Tue Jun 09, 2015 4:37 pm

Does this work?

https://dl.dropboxusercontent.com/u/485 ... ion-3.capx

it creates 3 objects every 2 seconds on random spawn-locations..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Jun 09, 2015 5:12 pm

Thank you everyone.
@LittleStain That is what I was looking for exactly 100%. Now I know how to continue my game :) Many thank yous.
Now to figure out how to mark this thread solved...
B
9
S
1
Posts: 56
Reputation: 576


Return to How do I....?

Who is online

Users browsing this forum: ramyaswetha and 5 guests