Speedhack Keybind
Greetings I'm using the following lua script with CE in order to go a "little" bit faster than the regular survivor speed.
SpeedHackAmount=1.1;
KeyForSpeedhack = VK_LSHIFT;
lastSpeed=0;
function checkKeys(timer)
if (isKeyPressed(KeyForSpeedhack)) then
if lastspeed ~= 1 then
speedhack_setSpeed(SpeedHackAmount)
lastSpeed=1
end
else
if lastspeed ~= 0 then
speedhack_setSpeed(1)
lastSpeed=0
end
end
end
t=createTimer(nil)
timer_setInterval(t, 10)
timer_onTimer(t, checkKeys)
timer_setEnabled(t, true)
But I play with a PS3 (or Xbox 360) controller rather than with mouse and keyboard so obviously it is very uncomfortable to press the left shift on my keyboard while trying to run around with the joysticks. I asked for a solution in an already created thread but the Edit>Settings>Hotkeys>Toggle the Speedhack (or Speedhack speed 1) alternative doesn't seem to be working for me. All that being said can anyone help me figure out how to use the corresponding running button on the controller (being it L1 on PS3 or LB on Xbox 360) instead of using the regular Left Shift on the keyboard? I know it has something to do with line "KeyForSpeedhack = VK_LSHIFT;"
SpeedHackAmount=1.1;
KeyForSpeedhack = VK_LSHIFT;
lastSpeed=0;
function checkKeys(timer)
if (isKeyPressed(KeyForSpeedhack)) then
if lastspeed ~= 1 then
speedhack_setSpeed(SpeedHackAmount)
lastSpeed=1
end
else
if lastspeed ~= 0 then
speedhack_setSpeed(1)
lastSpeed=0
end
end
end
t=createTimer(nil)
timer_setInterval(t, 10)
timer_onTimer(t, checkKeys)
timer_setEnabled(t, true)
But I play with a PS3 (or Xbox 360) controller rather than with mouse and keyboard so obviously it is very uncomfortable to press the left shift on my keyboard while trying to run around with the joysticks. I asked for a solution in an already created thread but the Edit>Settings>Hotkeys>Toggle the Speedhack (or Speedhack speed 1) alternative doesn't seem to be working for me. All that being said can anyone help me figure out how to use the corresponding running button on the controller (being it L1 on PS3 or LB on Xbox 360) instead of using the regular Left Shift on the keyboard? I know it has something to do with line "KeyForSpeedhack = VK_LSHIFT;"
