#small line of code help

4 messages · Page 1 of 1 (latest)

vale snow
#

"query.relative_block_has_any_tag(0, -1, 0, 'grass')
&&
q.life_time - q.anim_time > math.random(5, 60)"

Only the first query works, it ignores the && and everything after it. Why?
This is the trigger for an animation controller state transition btw

fleet oracleBOT
#
Welcome to the help forum!

Please make sure to read #1029468016594911232 as it may answer your question!

Once your question has been resolved, please mark the post as closed by using the </close:1163944441741049897> command.

vale snow
#

I figured this out! The second half of the trigger has to go inside parenthesis in math.cos()

#

So "query.relative_block_has_any_tag(0, -1, 0, 'grass') && math.cos(q.life_time - q.anim_time > math.random(5, 60))"