PTBr/Eng Pick any number between two values?

Discussion and feedback on Construct 2

Post » Fri Apr 29, 2016 8:28 pm

Example: I'm 100, and I want any value in this period 50-70
note: is not an random value
xD thank you!
B
21
S
2
Posts: 43
Reputation: 947

Post » Sat Apr 30, 2016 7:04 am

We don't understand. Please add more details.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,459

Post » Sat Apr 30, 2016 4:47 pm

keroberos wrote:We don't understand. Please add more details.

ok
B
21
S
2
Posts: 43
Reputation: 947

Post » Sat Apr 30, 2016 4:48 pm

I have variable "Draw = 100" to put it away a whole number.
Suppose out 35
I want to happen an event between 30 - 40 of the variable "Draw" to do it?
Unfortunately I do not speak English and the translation must go bad
B
21
S
2
Posts: 43
Reputation: 947

Post » Sat Apr 30, 2016 5:34 pm

If I understand right, you want an event to happen if number between 30 to 40 is chosen when calculating a (random?) number between 0 to 100?
B
13
S
3
Posts: 13
Reputation: 808

Post » Sat Apr 30, 2016 6:42 pm

Kossad wrote:If I understand right, you want an event to happen if number between 30 to 40 is chosen when calculating a (random?) number between 0 to 100?


from what I understand here in translation , that's it!
B
21
S
2
Posts: 43
Reputation: 947

Post » Sun May 01, 2016 10:09 am

Governador wrote:
Kossad wrote:If I understand right, you want an event to happen if number between 30 to 40 is chosen when calculating a (random?) number between 0 to 100?


from what I understand here in translation , that's it!


For example if you have a variable called "Count" which is set to a some value during the game with different events. And you want to check, if the value is between 30 to 40 during the game.

You can do this with multiple ways, one is to compare the Count variable on every tick to check, is it equal or more than thirty, and add another condition in to that event to see is it equal or less than 40. In there, you can add the actions you need.

Hope this helps!
B
13
S
3
Posts: 13
Reputation: 808

Post » Sun May 01, 2016 1:22 pm

Kossad wrote:
Governador wrote:
Kossad wrote:If I understand right, you want an event to happen if number between 30 to 40 is chosen when calculating a (random?) number between 0 to 100?


from what I understand here in translation , that's it!


For example if you have a variable called "Count" which is set to a some value during the game with different events. And you want to check, if the value is between 30 to 40 during the game.

You can do this with multiple ways, one is to compare the Count variable on every tick to check, is it equal or more than thirty, and add another condition in to that event to see is it equal or less than 40. In there, you can add the actions you need.

Hope this helps!


That's what I was looking for , just put two conditions at the same event "Variable ≤40 Variable ≥30 = action. Something simple was more than intrigued me enough, thank you helped me a lot !
B
21
S
2
Posts: 43
Reputation: 947

Post » Sun May 01, 2016 1:48 pm

Great! Glad that we found the solution. :) Keep on learning!
B
13
S
3
Posts: 13
Reputation: 808


Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests