This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Is there any documentation somewhere on how to trigger animations conditionally? So far the only way I've been able to get it work is by calling the animate script, however that is running the animation non stop.
Example
A"scripts": { "pre_animation": [ "variable.state = query.is_dancing ? 3 : (query.is_sitting ? 2 : (!query.is_on_ground && !query.is_jumping && !query.is_riding ? 0 : 1));", "variable.dance.x = Math.cos(query.life_time*57.3*30.0);", "variable.dance.y = Math.sin(query.life_time*57.3*30.0);", "variable.wing_flap = ((math.sin(query.wing_flap_position * 57.3) + 1) * query.wing_flap_speed);" ], "animate": [ "flying" ] }, "animations": { "moving": "animation.pidgey.moving", "base": "animation.pidgey.base", "dance": "animation.pidgey.dance", "sitting": "animation.pidgey.sitting", "flying": "animation.pidgey.flying", "standing": "animation.pidgey.standing", "look_at_target": "animation.common.look_at_target" }, "animation_controllers": [ { "setup": "controller.animation.pidgey.setup" }, { "move": "controller.animation.pidgey.move" } ]
Is there any documentation somewhere on how to trigger animations conditionally? So far the only way I've been able to get it work is by calling the animate script, however that is running the animation non stop.
Example
A"scripts": {
"pre_animation": [
"variable.state = query.is_dancing ? 3 : (query.is_sitting ? 2 : (!query.is_on_ground && !query.is_jumping && !query.is_riding ? 0 : 1));",
"variable.dance.x = Math.cos(query.life_time*57.3*30.0);",
"variable.dance.y = Math.sin(query.life_time*57.3*30.0);",
"variable.wing_flap = ((math.sin(query.wing_flap_position * 57.3) + 1) * query.wing_flap_speed);"
],
"animate": [
"flying"
]
},
"animations": {
"moving": "animation.pidgey.moving",
"base": "animation.pidgey.base",
"dance": "animation.pidgey.dance",
"sitting": "animation.pidgey.sitting",
"flying": "animation.pidgey.flying",
"standing": "animation.pidgey.standing",
"look_at_target": "animation.common.look_at_target"
},
"animation_controllers": [
{ "setup": "controller.animation.pidgey.setup" },
{ "move": "controller.animation.pidgey.move" }
]