Ticcmd, and overriding player input

Status
Not open for further replies.
Does modifying any of the ticcmd variables for a player actually do anything? I've tried it both in the thinkframe and mobjthinker hooks, and the most I've managed is half-preventing a player from moving forwards (they're still able to move slightly). Is there any means of completely overriding a player's input with something else (thus, forcing them to perform a specific action)?
 
This is a completely unrelated question, but I do want to bump this to make sure it doesn't get lost: Is there a way to check the current value of a given console command? For example, if I wanted to run a certain bit of code depending on if chasecam was set to on or off, or something like that.
 
While I have no idea on what to do about your first question, sadly it's impossible to check for the current variable of console variables (which is pretty awful), but you can check for chasecam in a hud hook like this since it takes the camera as third argument

Code:
hud.add(function(v, p, c)
 if c.chase then do stuff end
end)
 
Well, that basically works for what I'm trying to do (that being forcing first-person). Having to check inside of a hud hook means having to do complicated workarounds, but whatever. Thanks.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top