Take a look at this:
class Kla_Betoni:Kla_objConKit
{
scope=public;
mapSize=5;
destrType = DESTRUCTNO;
displayName="Cement mixer";
model="\KLA_ConKit\betoniera.p3d";
animated=1;
class Animations
{
class ani_VascaMixer
{
type="rotation";
animPeriod=100000;
multiplyer=20;
selection="vasca";
axis="rotate_axis";
angle0=0;
angle1="-20000 * 3.141592654";
};
};
class UserActions
{
class StartMixerRotation
{
displayName="Start mixer";
position="pos_start";
radius=2.000000;
condition="this animationPhase ""ani_VascaMixer"" <= 0";
statement="this animate [""ani_VascaMixer"", 1]; [this] exec ""\kla_conkit\scripts\mixer.sqs""";
};
class StopMixerRotation
{
displayName="Stop mixer";
position="pos_start";
radius=2.000000;
condition="this animationPhase ""ani_VascaMixer"" > 0";
statement="this animate [""ani_VascaMixer"", (this animationphase ""ani_VascaMixer"")]";
};
};
With the config above the mixer starts it's rotation in a regular way and the "Stop Mixer" action is displayed properly. The problem appears when the time to stop the rotation comes: by selecting the action the rotation stops immediately, but the "Stop mixer" action won't disappear and the "Start mixer" action remains hidden.
The scripts attached to the config starts a sound effect.
Any help?
Thanks in advance.
Klavan