0

how to make RUN when down SHIFT key?

MD Tajuddin Sadique 6 months ago in Game Creator updated by Marti (Lead Developer) 6 months ago 3

I All-ready Down this much :


1) First i add new locomotive animation of RUN,with i download from Mixamo .

2) I Create new Trigger and renaming as RUNNING, and change trigger as KEYDOWN and keycode is LEFT SHIFT.

3) Then under running I create new action and rename as KEYDOWN , here first i create new action and change it as CAN RUN=TRUE, then i create CHANGE PLAYER STATE and select RUNNING ANIMATION which i add from Mixamo(point no.1),then i create new trigger ,and select trigger as KEYUP and keycode is LEFT-SHIFT.

4) Then i create new Action under Running ,and name it as KEYUP,here i select action as RESET PLAYER STATE ,and also =Change player CANRUN=false.

and when i hit play , MY Player is not Running when i hit left-shift , 

NEED LITTLE HELP HERE.

 

Unity version:
2018.4.15f1
Game Creator version:
Game Creator v1.1.1

Answer

+2
Answer

You are over complicating it.

In the player inspector, unclick Can Run - the player will walk.

Add a trigger to your scene, Input/OnKeyDown/Left Shift

Add and Action to this trigger, Character/ChangeProperty/CanRun tick

Add another trigger, Input/OnKeyUp/Left Shift

Add and Action to this, Character/ChangeProperty/CanRun untick

This will make the player run but only while the left shift is down.

Hope this helps

+2
Answer

You are over complicating it.

In the player inspector, unclick Can Run - the player will walk.

Add a trigger to your scene, Input/OnKeyDown/Left Shift

Add and Action to this trigger, Character/ChangeProperty/CanRun tick

Add another trigger, Input/OnKeyUp/Left Shift

Add and Action to this, Character/ChangeProperty/CanRun untick

This will make the player run but only while the left shift is down.

Hope this helps

ohh its super easy :D , thanks