mygedz 0 Posted July 2, 2017 There is a gate: Land_ConcreteWall_01_l_gate_F. I need to open them using Triger when passing them. How to know the animation for the opening of the thief to register the trigger. Animation Door_1_rot, not running for the gate. Help me! Share this post Link to post Share on other sites
Larrow 2814 Posted July 2, 2017 Right click the wall in Eden and choose "Find in Config Veiwer". Double click "Land_ConcreteWall_01_l_gate_F" class to expand its child properties, you will see a child class named "AnimationSources". Double clicking "AnimationSources" will show the available animations of the object. Further down you will also find another child class called "UserActions", this is what adds the actions available to open/close the gate. Expand "UserActions" and select "OpenDoor_1" in the right window you will see a property called "statement" this is the code run when the action is used. [this, 1, 1] call BIS_fnc_Door; Where this is the concrete wall. If you select "CloseDoor_1" its statement reads.. [this, 1, 0] call BIS_fnc_Door; Now open up the functions viewer and set the top three drop downs to ConfigFile, All and All. Scroll down the list until you find Door this is the function name minus the BIS_fnc_ part. Select Door, at the top of the main window you will see conformation that we are looking at the correct function, BIS_fnc_door. // Open or close a door // _this select 0 object pointer // _this select 1 door animation // _this select 2 desired animation phase private [ "_structure", "_door", "_target" ]; _structure = param [0, objNull, [objNull]]; _door = param [1, 0, [0]]; _target = param [2, 0, [0]]; if (!(isNull (_structure))) then { if ((this getVariable [format ["bis_disabled_Door_%1", _door], 0]) != 1) then { _structure animateSource [format ["Door_%1_sound_source", _door], _target]; _structure animateSource [format ["Door_%1_noSound_source", _door], _target]; } else { _structure animateSource [format ["Door_%1_locked_source", _door], (1 - (this animationSourcePhase (format ["Door_%1_locked_source", _door])))]; }; }; Here we see that if the door is not locked ("bis_disabled_Door_%1") it plays two animations. Now we can use this function ourselves but there is one caveat. When the function was written this was used in the check for if the door was locked, instead of the functions parameter _structure (TICKET). Which is fine for when it is being called from the objects action, but means we need to set this to the wall object before we call the function. In Eden in the gate objects attributes give it a variable name eg Gate. To open the gate use... this = Gate; [ Gate, 1, 1 ] call BIS_fnc_door; To close the use.. this = Gate; [ Gate, 1, 0 ] call BIS_fnc_door; OR if you wish to do it yourself via the animations gate animateSource ["Door_1_sound_source", 1]; gate animateSource ["Door_1_noSound_source", 1]; for open and change the 1 at the end of each statement to 0 for close. 1 Share this post Link to post Share on other sites
mygedz 0 Posted July 2, 2017 Thank you very much!!! Share this post Link to post Share on other sites