Newbie trying to activate deactivate triggers via script.

Trying to make it so i can turn on or off triggers in my transitions inside instances of the below script so it “defaults” to a movement animation based on what is left available. Want to make it so I can add animations linked directly to key presses but excluding all but one trigger.

if (Input.GetKeyDown(“right”)) {
StartCoroutine(smooth_move(right, 1f)); //Calling the coroutine.
anim.SetTrigger(“KeyActiveW”); anim.SetTrigger(“KeyActiveS”); anim.SetTrigger(“KeyActiveN”);}

So basically I’ll use a InputGetKeyDown to start a routine that triggers movement and facing animation by excluding all but one trigger. This way I can add other button to anim functions and keep everything nice and seperated. Just not sure how to address the triggers individually from inside the GetKeyDown function for that particular key. Thanks for any help.

Triggers are boolean variables that switch because transitions that they’re assigned to are being used, read the short description here. From what I understand of your situation, you need to use bool parameters, because you can switch those easily through code.

That was right bool params worked but still a little stuck on efficient usage keep getting stuck in anim states and not able to return to idle properly. Terribly newbish but thanks for helping me along as i figure it out. Most of the answers u get here are better than the question u ask in the first place. Great community.