if you input [2], how do you make it turn into 50% when you click a button?
Offline
I would like a reply...
Offline
I'm assuming you are getting your input from an answer?
Simply divide it by 2.
You could even store it in a variable, so that it is visible.
when gf clicked ask [Please enter an input number] and wait set [input number v] to (answer) set [answer v] to ((answer)/[2]) say (answer)
Last edited by jji7skyline (2012-03-20 18:39:37)
Offline
when gf clicked set [everything] to (0) ask [Please input a number] set [click # times] to ((answer)) set [points for click] to ( [ (( click # times </> 2 )) ] )(I type 4)
Last edited by k9lego (2012-03-20 18:49:08)
Offline
k9lego wrote:
when gf clicked set [everything] to (0) ask [Please input a number] set [click # times] to ((answer)) set [points for click] to ( [ (( click # times </> 2 )) ] )(I type 4)
I get 2 points every answer...
So you want a variable to be halved every time you click a button?
Ok then.
when [sprite1] clicked set [variable v] to ((variable)/(2))
Last edited by jji7skyline (2012-03-20 18:52:51)
Offline
jji7skyline wrote:
k9lego wrote:
when gf clicked set [everything] to (0) ask [Please input a number] set [click # times] to ((answer)) set [points for click] to ( [ (( click # times </> 2 )) ] )(I type 4)
I get 2 points every answer...So you want a variable to be halved every time you click a button?
Ok then.when [sprite1] clicked set [variable v] to ((variable)/(2))
I'm just asking how you get (number) to 100.
(example: I type 4, 4 = 25.)
Offline
You want percentages? (2 = 50, 3 = 33.33, 4 = 25, 5 = 20, etc.)
((100) / (input))
Offline
THANK YOU! k9lego
Offline