Hello everyone. I’m still new in programming and Unity. Currently, i am developing game look like Resident Evil Remastered HD that release recently. I use Maximo’s Basic locomotion script and animator for my character, which does not include run animation. I really want my game have the similar control scheme like Resident Evil classic.
My question is how to modify the Maximo script and add the shift key as a trigger for running? Please help me.
You should first identify the part of the script that is launching the walk animation and then if you don’t figure how it works try to learn that before going further
Scripting is the key to any project you’ll have so go learn first.
hint: it must be an event in OnGUI()
You want your character to run yet do not seem to have set up any parameters to tell the engine when to switch the running animation on/off.
For a start the Unity Standard Assets comes with a FPS controller (and script) that provides the functions you are looking for (running when shift is held down) which you could dissect to fine the code you need.
You appear to have a “moved” parameter (is this your running parameter?) you should use better names like IsWalking, IsIdle, IsRunning.
Either way you need a parameter that deals with running (I suggest IsRunning)