- Home /
Animation Event Bool Function?
Hi, I'm trying to set up a simple script to work with animation events. I just want to be able to set a bool to true or false. What type of function could I use to accomplish this? Here's my basic script, but it doesn't appear in my animation events:
var footstep : boolean = false;
function Start () {
footstep = true;
}
maybe function Start is no allowed to use there, use a custom one
function SetFootstepTrue()
{
footstep = true;
}
Answer by M-Elwy · Feb 23, 2021 at 11:50 PM
Animation event parameters can only be a float, an int, a string, an object reference
https://docs.unity3d.com/ScriptReference/AnimationEvent.html
There is no bool parameter, but you can pass an "int" as a flag (0= True, 1=False)
Your answer
Follow this Question
Related Questions
Does anyone know about BeingChangeCheck function? 0 Answers
check bool in WaitForSeconds 2 Answers
Use of boolean functions in c# 1 Answer
Enter a specific word script 0 Answers