tshirt's score count up like ticker demo - increase by 100 only ?
Hey all,
So, i'm not to good with math
and trying to figure out how to make the demo
count up only by 100.. want to use this setup in a mini game i'm making.
http://gamesalad.com/game/play/81348
Digit Actor
(self.div is set at 10)
constrain attribute
floor(( game.Score % self.Div )/( self.Div /10))..".png"
then on the press button actor it has
Interpolate game.score to game.score+random(12345,12345)
tried playing around with both actors and numbers and can get it to go by 100's if i make
game.score+10 but that only works like twice then it goes by 104, and so on.
thanks
So, i'm not to good with math
![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
count up only by 100.. want to use this setup in a mini game i'm making.
http://gamesalad.com/game/play/81348
Digit Actor
(self.div is set at 10)
constrain attribute
floor(( game.Score % self.Div )/( self.Div /10))..".png"
then on the press button actor it has
Interpolate game.score to game.score+random(12345,12345)
tried playing around with both actors and numbers and can get it to go by 100's if i make
game.score+10 but that only works like twice then it goes by 104, and so on.
thanks
Comments
Or, you could multiply the random number you get by 100:
game.score+random(x,y)*100
so example: it has to roll till 1100, when i hit the button it has to stop rolling!