Possible to toggle/modify Max Speed attribute on the fly?
lordsprinkles
Member Posts: 19
Hi Guys,
I'm having trouble limiting how fast my character runs vs. how high he can jump. I want him to JUMP with a max velocity of 350 but RUN with a max velocity of 250. The problem I'm running into is that I can't get a Change Attribute function to toggle Max Speed (250) to 0 (off) or modify Max Speed to 350 from 250 when jumping to work. I'm not sure if I'm doing it wrong or the feature isn't supported.
http://imgur.com/RRHcc.jpg
Is there some way to do this other than toggling the Max Speed attributes?
I tried looking at the Expression Editor equation in the Jump section of the Wiki but I don't understand what the math is doing...
Thanks for any help.
I'm having trouble limiting how fast my character runs vs. how high he can jump. I want him to JUMP with a max velocity of 350 but RUN with a max velocity of 250. The problem I'm running into is that I can't get a Change Attribute function to toggle Max Speed (250) to 0 (off) or modify Max Speed to 350 from 250 when jumping to work. I'm not sure if I'm doing it wrong or the feature isn't supported.
http://imgur.com/RRHcc.jpg
Is there some way to do this other than toggling the Max Speed attributes?
I tried looking at the Expression Editor equation in the Jump section of the Wiki but I don't understand what the math is doing...
Thanks for any help.
Comments
For movement, I just have an accelerate rule in the direction I want to move. For jumping I have the same thing but at a different speed and under a timer. "For .1 seconds accelerate up at 1100."
Would that work for something you're trying to do? or is it more complicated.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
That sounds like what I was looking for but I didn't know how to go about it.
Mulchany,
Accelerate at a speed of 700 is way too fast when the button is held down for more than a few seconds (the top speed is way too fast for what I'm doing) but the acceleration and deceleration speed is perfect. Just needed a way to limit the max velocity once the button is held down for a long period of time.
What type is the 700 value? Integer? Real?
Where do you put the "linear movement X < maxXvelocity" rule? Is it attached to the Accelerate attribute only? Or in the main section of the rule, if Right keyboard is down, etc.?
Thanks!
All right, here we are. I have some extra stuff in there and there's more that I'm not showing but you'll have to tweak for your own game.
Here's how I set up my keys. This is just the "right" key:
http://i3.photobucket.com/albums/y58/MattVG/Game Stuff/Key-Mapping-Right.jpg
Here are my player's attributes:
http://i3.photobucket.com/albums/y58/MattVG/Game Stuff/Player-Attributes.jpg
Here's my right/left movement rule:
http://i3.photobucket.com/albums/y58/MattVG/Game Stuff/Rule-Right-Accelerate.jpg
Here's my jump rule:
http://i3.photobucket.com/albums/y58/MattVG/Game Stuff/Rule-Jump.jpg
I hope that's not too confusing and helps you figure out what you need to do.
EDIT:
Here's a simplified version of what I was talking about. Again, it's for the "right" key only.
http://i3.photobucket.com/albums/y58/MattVG/Game Stuff/Picture2-1.png