• SUPERHOT (Time only moves when you move) gamemode help
    4 replies, posted
Hey! I want to make a SUPERHOT gamemode and for that i need a "Time only moves when you move" mechanic. Now... I dont know how to program that. I looked through the docs and i didnt find anything interesting. Can somebody help me out here?
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/game/SetTimeScale]game.SetTimeScale[/url]
Sorry but that doesnt help very much... I need something that makes it slow motion when you stand, and normal motion when you are moving.
You could check if the player is moving in a [url=http://wiki.garrysmod.com/page/GM/SetupMove]GM:SetupMove[/url] hook by checking if [url=http://wiki.garrysmod.com/page/Entity/GetVelocity]Entity:GetVelocity[/url][url=http://wiki.garrysmod.com/page/Vector/Length2DSqr]:Length2DSqr[/url] doesn't equal 0 and set the timescale accordingly.
Thank you! It worked!
Sorry, you need to Log In to post a reply to this thread.