walking with running function added

Blitz3D Forums/Blitz3D Programming/walking with running function added

Phoenixx(Posted 2013) [#1]
Hay everyone, I'm having trouble with getting a main character with the walking function already added, to run wits the same button control's, and having that character run using the same buttons with one other button pushed for the running function, if anyone can help out that would be great and thanks.


stayne(Posted 2013) [#2]
If KeyDown(uparrow)
speed = 1
Else If KeyDown(uparrow) And KeyDown(shift)
speed = 2
EndIf

MoveEntity Player,0,0,speed

speed = 0

Hope that helps.


Phoenixx(Posted 2013) [#3]
Thanks I'll try the code out when I finish work, a question I have this, is will this code work with 3D characters as will, hope so, will try with 3D character soon.


Phoenixx(Posted 2013) [#4]
Thanks again just finished working the code into a 3D character and its working fine now, had a little problem at the first, but once I changed the turning keys to speed2 everything worked out thanks man