Madin 9 Posted May 9, 2017 HI. Im new to arma 3 scripting language. Im trying to do a simple task with triggers. what i need to type in initialization, to set my objective as succed if i heal a teammate(pilot1)? im trying something like if (damage pilot1 < 0.25) then {this}; its my last attempt, and i have many wariations of it, but i failed every time. I would appreciate any help! :) Share this post Link to post Share on other sites
7erra 629 Posted May 9, 2017 Init line of the pilot: this addEventHandler ["HandleHeal", { _this spawn { sleep 5; // Your code }; }]; Or more advanced: this addEventHandler ["HandleHeal", { _this spawn { params ["_unit","_healer","_healerCanHeal"]; _damage = damage _unit; _script = [] spawn {sleep 5}; waitUntil {_damage != damage _unit OR scriptDone _script}; if (scriptDone _script OR _damage < damage _unit) exitWith {}; // Your code }; }]; Share this post Link to post Share on other sites
Madin 9 Posted May 9, 2017 Thanks for reply, but im affraid its not what i want, or i simply dont understand it. i need something like this: https://steamuserimages-a.akamaihd.net/ugc/824567239163670420/C539A87F87E460F9CADA0C8602A552E27376782F/ Warunek = initialization. i want to do it with triggers. Share this post Link to post Share on other sites
Grumpy Old Man 3550 Posted May 10, 2017 10 hours ago, Madin said: Thanks for reply, but im affraid its not what i want, or i simply dont understand it. i need something like this: https://steamuserimages-a.akamaihd.net/ugc/824567239163670420/C539A87F87E460F9CADA0C8602A552E27376782F/ Warunek = initialization. i want to do it with triggers. What exactly do you want? You seem confused, heh. From what I understand you want to detect the injured pilot inside the trigger area, start a task called "Heal the pilot" or whatever and wait until the pilot is at full health and complete the task? Cheers Share this post Link to post Share on other sites