• How would I lock the player from looking left or right?
    1 replies, posted
I am working on a little project for Gmod, which may be sort of like Shadow Complex ([url]http://www.youtube.com/watch?v=fZwfpmH0Bs8[/url] , so you know my goal here) when I'm finished. What I need to know would be how to make it so instead of having the player look left or right, it turns him/her around and they can look up and down, but not allowed to look left or right at all. I already have the view the way I want it, and this is what is kind of holding me back. And I could probably figure this out, but since I'm new to this it might take me some time, so I might as well ask this too. How would I make the a and d keys move the player forwards/backwards (Left and right, but facing forwards/backwards, in this case), also like Shadow Complex. Probably just remapping the keys. Thanks in advance.
Making player move in specific direction while holding movement key would go in [b][url=wiki.garrysmod.com/?title=Gamemode.CreateMove]Gamemode.CreateMove [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]. The aiming part. If you just want to block player from changing view in specific direction, do it in [b][url=wiki.garrysmod.com/?title=Gamemode.CreateMove]Gamemode.CreateMove [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] aswell(i think), or do it in [b][url=wiki.garrysmod.com/?title=Gamemode.InputMouseApply]Gamemode.InputMouseApply [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]. With [b][url=wiki.garrysmod.com/?title=Gamemode.InputMouseApply]Gamemode.InputMouseApply [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] you can also make some kind of 'pointer', like a dot, where player aims (that moves on screen).
Sorry, you need to Log In to post a reply to this thread.