OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: kevind2003 on 11 Apr 2003, 21:13:58

Title: how to activate animation by script?
Post by: kevind2003 on 11 Apr 2003, 21:13:58
Hi,

I placed a warehouse building in game and its main door is closen by default, I want the door will open automatically when enemy was detected, I tried

_obj animate ["gate1",1]

and

_obj animationPhase "gate1"

but doesn't seem to work, by the way I'm using the warehouse from AGS Industrial Pack, please help


the code:

class OpenGate1
{

displayName="$STR_DN_OUT_O_DOOR";
position="pos_gate1";
radius=5;
condition="this animationPhase ""gate1"" < 0.5";
statement="this animate [""gate1"", 1];";
};
class ClosenGate1
{

displayName="$STR_DN_OUT_C_DOOR";
position="pos_gate1";
radius=5;
condition="this animationPhase ""gate1"" >= 0.5";
statement="this animate [""gate1"", 0];";
};
Title: Re:how to activate animation by script?
Post by: Iwesshome on 11 Apr 2003, 23:11:32
Is there anything in the readme file of the add-on that explains how to animate their gate?

IW
Title: Re:how to activate animation by script?
Post by: kevind2003 on 12 Apr 2003, 09:35:45
unfortunately it's not mentioned in readme  :-\