10-06-2014, 09:55 PM
So, I've wanted to create a script where the player gets his controls inverted. I tried doing it like this:
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?
Code:
void CollideReverseControls(string &in asParent, string &in asChild, int alState)
{
SetPlayerMoveSpeedMul(-1);
SetPlayerRunSpeedMul(-1);
SetPlayerLookSpeedMul(-1);
FadePlayerFOVMulTo(1.75f, 5.0f);
PlayGuiSound("27_thump", 1.0f);
AddTimer(asParent, 0.5f, "TimerReverseControls");
}
void TimerReverseControls(string &in asTimer)
{
FadePlayerFOVMulTo(1.0f, 2.0f);
}
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?