glitch (Speed issue with button)
igpxnaruto4
Member Posts: 81
ok so i made a speed up button and made it to an integer and set it to 0, then i went into the button and made a rule that checks if it is o and then i made another rule, and when you click the button it would change to 1, then i made my actor go 2 times the speed. after that i made it so that when you click again on the button it makes the integer to 0... but that is the part i did wrong, i made a debug actor and made it display the integer and i saw that it did go up but when i click again it doesent go down... any idea on how to do this?
Comments
Speed is fairly tricky to nail down in GameSalad. If it's something simple like linear velocity along the X axis then that's a simple fix.
But if it's the Max Speed of an actor, then that's a little more tricky.
If it's the "Move" speed or a "change velocity" speed then that's a whole 'nother issue.
What are you trying to change in speed exactly?
Change it to something like, "Speed issue with button" or something of that nature. More people will be inclined to give you a hand. :-)
--Change attribute game.attibute to (game.attibute+1)%2
That will make it switch between 1 and 0 each time it is pressed.