CMoveData.GetForwardSpeed

From GMod Wiki

Revision as of 22:00, 18 September 2009 by Dlaor (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax MoveData:GetForwardSpeed( )
Description:
Returns the players forward speed
Returns: Number
In Object: Cmovedata
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=CMoveData.GetForwardSpeed]CMoveData.GetForwardSpeed [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionMake the player move up as they increase in speed.
Used onNewerShared.png
Code
 
function GM:SetupMove( PLAYER, MOVE )
    if (MOVE:GetForwardSpeed() > 100) then
        MOVE:SetUpSpeed(100) // make the player move up as they increase in speed.
    end
end
 
OutputNothing


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox