Condition in AnimatorGroup
Posted: Mon Oct 23, 2017 4:31 am
I have a bunch of AnimatorSimples in an AnimatorGroup. A particular AnimatorSimple should be active only under specific circumstances, so I wrapped it in a Condition. But this makes everything crash... Or is this not meant to be used like that?
Code: Select all
<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ZGameEditor application" FileVersion="2">
<OnLoaded>
<StartAnimator Animator="anim_Up"/>
</OnLoaded>
<OnUpdate>
<AnimatorGroup Name="anim_Up" Duration="1">
<Animators>
<AnimatorSimple Duration="1" Target="variable1" ToValue="1"/>
<Condition Expression="return(allow);">
<OnTrue>
<AnimatorSimple Duration="1" Target="variable2" ToValue="1"/>
</OnTrue>
</Condition>
</Animators>
</AnimatorGroup>
</OnUpdate>
<Content>
<Variable Name="Variable1"/>
<Variable Name="Variable2"/>
<Constant Name="allow" Type="1" IntValue="1"/>
</Content>
</ZApplication>