How do I: Pick a random UID Or IID

Get help using Construct 2

Post » Sun Mar 08, 2015 10:22 pm

Hello I made something where is spawning randomly placed Enemies.
But Then I realized I needed Terrain objects. So, that didn't work.

So in other Terms I need. To pick a randomly object by, UID Or IID.

I'm using: system / create objects / I select the object to create: enemy/
then I need to put it somewhere, I made a object where Enemies should Spohn.
That is where the problem comes, it's picking the one with the lowest UID or IID.
Not quite random.

So if you know some solutions, it would be nice if you, posts a construct2 example,
or a, image, so I can understand.

And if you don't no a solution. Well, Have a nice and creative day. (◠‿‿◠)
Note: I have to full version of construct2, it just said Account could not found, so I made a new account.
Posts: 21
Reputation: 267

Post » Mon Mar 09, 2015 12:20 am

UID are assigned on creation on the layout (during your design), if you want to pick a random spawn object to place the enemy simply use pick random (your object) and that's all. (and use spawn instead of creat object)

maybe this can make it more clear
Posts: 272
Reputation: 12,500

Post » Mon Mar 09, 2015 1:12 am

Thank you, you see I'm 95% word blind. And it's hard to make my program read everything.
A To be honest I didn't know that function existed, but now I do.

So thank you @danuyos
Posts: 21
Reputation: 267

Return to How do I....?

Who is online

Users browsing this forum: ghzmxls, guannstar and 15 guests