PTBr/Eng Pick any number between two values?

Discussion and feedback on Construct 2

» 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
23
S
2
Posts: 47
Reputation: 1,005

» Sat Apr 30, 2016 7:04 am

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
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469

» Sat Apr 30, 2016 4:47 pm

ok
B
23
S
2
Posts: 47
Reputation: 1,005

» 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
23
S
2
Posts: 47
Reputation: 1,005

» 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?
Jestercraft: Online courses, lectures, workshops and all the tools you need when starting your journey in learning game development & gamification.
B
13
S
3
Posts: 16
Reputation: 814

» 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
23
S
2
Posts: 47
Reputation: 1,005

» Sun May 01, 2016 10:09 am

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!
Jestercraft: Online courses, lectures, workshops and all the tools you need when starting your journey in learning game development & gamification.
B
13
S
3
Posts: 16
Reputation: 814

» Sun May 01, 2016 1:22 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!

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
23
S
2
Posts: 47
Reputation: 1,005

» Sun May 01, 2016 1:48 pm

Great! Glad that we found the solution. Keep on learning!
Jestercraft: Online courses, lectures, workshops and all the tools you need when starting your journey in learning game development & gamification.
B
13
S
3
Posts: 16
Reputation: 814

Who is online

Users browsing this forum: No registered users and 8 guests