This works for the look speed, but not the move and run speed. Instead it locks itself to just down and left. It refuses to go up or right no matter what I press. Could there be a way to do inverted controls another way?
...But I can't resist a scripting challenge! I'm guessing you're going for a drunk/drugged effect. I have an idea that you could do with the 1.3 patch, although it would be clunky and not quite what you're after, but interesting to experiment with...
Spoiler below!
This is just an idea - not tested, not guaranteeing it will work without tweaks, or work at all.
So, to switch it on you call DrunkMode_Start() and that does your visual effects and whatever, then kicks off DrunkMode_Reset() after a random interval.
DrunkMode_Reset() stores the current player x and z as globals, then calls DrunkMode_Detect() after 0.1s.
DrunkMode_Detect() compares the globals to the new current player x and z to check if the player has moved in the last 0.1s, and then applies a force in the oppposite direction.
DrunkMode_Stop() switches it all off.
In other words, while drunk mode is active, every 0.5 - 2.5s, if the player moves, they will be shoved in the opposite direction. Like I said, I've not tested it, but I think this will give a nice stumbling effect, depending on how you tweak the forces.
Also, did you know that if FOV < 0 then it will flip the screen?
Slightly yea. What makes it strange though is the fact that this works for when you look around, the controls of the camera gets inverted through this. It's just the run and move that doesn't work. Instead the problem happens that I explained above.
And I didn't see your example. When I get back home I'm gonna test it out. Thanks
Derp.
(This post was last modified: 10-07-2014, 07:56 AM by Neelke.)
Why would a period there help? GetPlayerPosX is the name of a script function that calculates the X position. I don't think GetPlayerPos has been implemented as its own function and have it accept inputs like that... if C++ even works that way.
Crap. Well at least we can figure something out with this despite me not being able to use it. I could probably create something too for people with version 1.2, but we'll see I guess.
If nothing comes up, I guess I have to be happy with an inverted camera. It's hard too so it's fine
Derp.
(This post was last modified: 10-08-2014, 03:55 PM by Neelke.)