Timer Bug

hi guys,i'm working on my jump control (still:( ) and I'm nearly done, now i just have to get my actor back down...
The problem is that I have a timer set up to turn 'Jump?' back to 0 after 0.1 seconds, but it doesn't work.
Any help would be much appreciated
P.S I am using the accelerate method, the linear velocity method isn't working for me, and the accelerate method looks better.
The problem is that I have a timer set up to turn 'Jump?' back to 0 after 0.1 seconds, but it doesn't work.
Any help would be much appreciated
P.S I am using the accelerate method, the linear velocity method isn't working for me, and the accelerate method looks better.
Comments
There are many jumping examples in the new+ tab of the GS creator. Just search for jumping in there and open some projects and see the coding. There are many ways to achieve this. Choose the one that best fits your game.
If attribute Jump? = 1
after 0.1 seconds
Change attribute Jump? to 0
For some reason this doesn't work, and the timer doesn't seem to do anything. Any help would help.
Liamo
So as a workaround, I'm using an endurance meter. I'm using the method from the CookBook page that tshirtbooth made about health meters, but altering it so it decreases with a timer while an attribute remains true, instead of collisions. And that attribute remains true as long as you are pressing a button. I haven't gotten to the testing part with a live actor to see when the attribute reaches 0 the linear velocity returns to normal, but testing the timer with a display text is showing that it "should" be working.
So what i'm experiencing is the timer won't work to change a behavior directly, but I can get it to work by the timer changing a custom attribute, and then tying an actor to that attribute, and then execute behaviors based on those changes. It's more logic, and unnecessary scripting, but it's a workaround for me at least.
Liamo