Hey, I was going through the script reference, _utility, and _utility_code, and I noticed that there is only a reference to checking if certain buttons are pressed, like attack, and use, and the generic
Code Snippet
Plaintext
buttonpressed();
only applies for host and appears to only apply for gamepads. Is there a way to check if any button is pressed, like forward, sprint, jump, etc.?
Last Edit: February 16, 2015, 08:49:09 pm by nabaro
Hey, I was going through the script reference, _utility, and _utility_code, and I noticed that there is only a reference to checking if certain buttons are pressed, like attack, and use, and the generic
Code Snippet
Plaintext
buttonpressed();
only applies for host and appears to only apply for gamepads. Is there a way to check if any button is pressed, like forward, sprint, jump, etc.?
I don't know of any easy way, but you can be clever with things and use other functions like isOnGround, for jumping (only works from the ground though), and getstance for prone or crouch buttons (prone doesn't work till you are on the ground and have crouched). Forward would need to be a lot more clever, and sprint the same. Plus there is ads also that you can get, shown in _zombiemode.gsc.
Last Edit: February 16, 2015, 09:06:17 pm by MakeCents
Looks alright needs a bit more modification on how far you move but nonetheless good job. Quite interested on what you used to move the player. Would it be setVelocity or something different?