Why can I not make my own Compare Value?

Steen Petersen

New member
Why is it that when I copy and paste the code from CompareFieldValue and make my own CompareValue they dont react the same in behaviourTree?

the only difference is:

in CompareFieldValue the return statement is:

Code:
return fieldValue.Equals(compareValue.GetValue()) ? TaskStatus.Success : TaskStatus.Failure;

and in CompareValue the return is:

Code:
 return (float)fieldValue < (float)compareValue.GetValue() ? TaskStatus.Success : TaskStatus.Failure;

why_not_same.png
 
Top