Gamemode.Move
From GMod Wiki
Revision as of 19:28, 11 April 2011 by Ultragamer (Talk | contribs)
Event Hook | |
Hook Name | Move |
Syntax | GM:Move( Player ply, Cmovedata move ) |
Description | This basically overrides the NOCLIP, PLAYERMOVE movement stuff. It's what actually performs the move. This function returns CMoveData, so return the data argument. The movement effects you get are based on how you modify the CMoveData. Return data to use normal movements. |
Returns | Cmovedata |
Lua State | |
BBCode | [b][url=wiki.garrysmod.com/?title=Gamemode.Move]Gamemode.Move [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Makes all players fly upwards. |
---|---|
Used on | |
Code | function Weeeee(ply, data) data:SetVelocity(Vector(0, 0, 1000)) end hook.Add("Move", "Weeeeeeeeeeee!!", Weeeee) |
Output | N/A |
Additional Notes
- Does not work on clientside if cl_predict is not set to 1.
- Returning modified data overrides movement, but not view angles.