problem smooth acceleration

wouterwouter Member Posts: 174
edited November -1 in Announce Your Game!
hi guys,

i have a little problem with a speed acceleration:

i want this: when you touch there's a big speed boost and then it stops and get slowly back to a basic speed of 200.

[when touch is inside:
[timer-> for 0.1 seconds (no run completion)
[timer-> every 0.05 seconds (no run completion)
change attribute game.speed to game.speed+20
]
]
]

and after touch is pressed there must be a reduction:

[when attribute game.speed != (is not equal to) 200
[(and)when touch is outside
[timer-> every 0.5 seconds (no run completion)
change attribute game.speed to game.speed-10
]
]
]

well this isn't working at all... sometimes the speed goes to 220 and stuck and an other time there happened nothing...

how can i do this (smooth!)

wouter

Comments

  • wouterwouter Member Posts: 174
    still not working....
    someone suggestions someone??

    oh i see that i placed this in the wrong forum... can be moved to working with gamesalad.. srry;)
  • JPickardJPickard Member Posts: 477
    Hmm. I need something similar in my game. Maybe: When touch is pressed and touch is released, instead of touch inside, touch outside? I'm new, but that's what I'd try next, if you already haven't.
  • wouterwouter Member Posts: 174
    yeah i tried already;) (and i'm also new xD)
    maybe it's a combination because i have tried everything (alright almost everything only not the good solution... xD)
  • JPickardJPickard Member Posts: 477
    Hmm. Does the whole "game" speed up? Or just the background, or just the main actor?

    either way. Keep us posted if you solve this.
  • wouterwouter Member Posts: 174
    yeah i will;)

    euhm only the character, but the character will not move (stays on 1/3 of the screen) so maybe that's a problem?
    (sometimes it works, only with a lot of shocking...)
  • wouterwouter Member Posts: 174
    mmmm it works (still a bit shocky), only one time and after that it does nothing..

    when touch is inside:
    timer for 2 seconds (no run completion)
    timer every 0.08 sec (no run completion)
    change attribute game.speed+2

    and the slow down rule is off..
  • wouterwouter Member Posts: 174
    mmm if i replace the touch for mousebutton down then it workst perfect (only still a bit shocking^^)
    is this a bug? will the touch work as i mean it to be on my iphone?
  • wouterwouter Member Posts: 174
    @$%#^$^$# still not good..
    problem:
    when the speed is not equal to 200 and the up button is not pushed down, there is a timer:
    every 0.001 seconds->speedd=speed-1.
    only... the character is moving backwards??! how can i fix this??
  • wouterwouter Member Posts: 174
    mmm maybe it's because it is change attribute and must be constrain attribute???
    (don't know the differents between them jet (now going to find out;)
    so if anyone knows you could spare me some time;P

    nope not working...
  • wouterwouter Member Posts: 174
    bump^^
    question:

    when the speed is not equal to 200 and the up button is not pushed down, there is a timer:
    every 0.001 seconds->speedd=speed-1.
    only... the character is moving backwards??! how can i fix this??

    (you have to slow down only the actor is moving back... xD)

    wouter
  • wouterwouter Member Posts: 174
    bump anyone?? anyone...
Sign In or Register to comment.