Random Object in a limited Area

Discussion and feedback on Construct 2

Post » Mon May 25, 2015 2:51 am

Message: markiing is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Hi, guys. I'm brazilian so.. sorry about my english, let me explain.

I can generate a random object in layout, but I want this object to be randomized in a particular area . He is currently randomizing the whole layout :(

It's it.

That's my project.

Please !
B
3
Posts: 3
Reputation: 181

Post » Mon May 25, 2015 3:02 am

If I understand correctly you want to do something like this:

-Set object x to 10 + random(10)
-Set object y to 20 + random(20)

This will create an object in a "random zone" between 10 and 20 on the x axis, and 20 and 40 on the y axis.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Mon May 25, 2015 3:41 am

That was exactly what I was looking for !!! Thanks a lot @Tokinsom
B
3
Posts: 3
Reputation: 181


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests