plasmacon 1 Posted November 3, 2014 I am a total noob and this is my first post so I will get right to it. I am creating a basic mission to familiarize myself with the mission editor and have until now figured out most of my own problems. I want a nonplayer character's death to cause a mission fail situation within the boundry of a trigger lets say, 40m by 40m. Lets call him Bob. I use the !alive command and everything works fine except when bob is outside of the trigger area. I get a mission fail whenever he is killed. I need him to die outside of a given area or time frame without triggering the mission failed. Maybe the !alive is the wrong way to do it, but I am not sure what else to do. I have tried to deletevehicle bob but I can not make it work. Maybe I am putting things into the wrong box, act and deact etc. I have tried to have one trigger override another trigger. I am not sure how to proceed. Any and all help is greatly appreciated as I really wish to not get frustrated with mission building. Again, I am very, very new to this and I need specific instructions as to put square peg into the blue square hole, not the red square hole etc. Hopefully this will be an easy one! Thanks Plas... Share this post Link to post Share on other sites
Lala14 135 Posted November 3, 2014 is it alright if you put down exactly how the trigger is set up. Share this post Link to post Share on other sites
plasmacon 1 Posted November 3, 2014 I have tried many triggers and different approaches. Basically the 20m ellipse, Type: Lose, Activation: BLUFOR, Once and Repeatedly, Present and not present. Condition: !alive bob. This is what I come back to because all of my searching has sent me back to square one. I just want the mission to fail if bob dies within that 20m radius, and the mission to continue if he dies outside the radius. A wait timer would be fine as well, but I can not seem to make that work either. He gets through his waypoints in about a minute, but every time he dies its mission over the different ways I have had this set up. Another approach is fine, I just am not seeing a direction to investigate. Share this post Link to post Share on other sites
iceman77 18 Posted November 3, 2014 Try this condition: !alive bob && bob in thisList Share this post Link to post Share on other sites
Lala14 135 Posted November 3, 2014 yea I would have either what Iceman77 has or this && !alive bob the thisList command when put into triggers will return an array of units who are currently within your trigger. If you wanted though to use thisList within a script you would have to have the trigger named and then you would use list <trigger_name>; also take a look at this Share this post Link to post Share on other sites
plasmacon 1 Posted November 3, 2014 Now the mission does not end anytime he dies... the only thing on bob is removeallweapons this; removeallassigneditems this; removevest this; removebackpack this; this setcaptive true; DisabledAIVoices_Gameplay_C_PvPscene Share this post Link to post Share on other sites
iceman77 18 Posted November 3, 2014 (edited) If none of that works. Place a trigger 40 x 40. Name it PLASMATRIG. Put the following as the end trigger's condition: !isNil "PLASMAEND" Put the following into the init.sqf** bob addEventHandler ["killed", { if ((_this select 0) distance PLASMATRIG < triggerArea PLASMATRIG select 0) then { PLASMAEND = true; publicVariable "PLASMAEND"; // MP hint "dead"; }; }]; ---------- Post added at 18:48 ---------- Previous post was at 18:44 ---------- Updated again. Sorry bout that. I didn't test it straight away.. Edited November 3, 2014 by Iceman77 Share this post Link to post Share on other sites
plasmacon 1 Posted November 3, 2014 That did the trick. I wish I understood what all that did basically. I guess you wrote a small script and the trigger PLASMATRIG executed the script. Now what that script is telling the game to do I do not understand. Thank you for your prompt help. I really don't want to rely on others to solve my problems, so if you could give me a quick description of what you told the script to accomplish, that would be greatly appreciated to further the learning process. Thanks again. Share this post Link to post Share on other sites
rejenorst 18 Posted November 3, 2014 (edited) The conditions you want to specify then it seems in the trigger is !alive Bob and that bob's distance from bobstrigger (name the trigger bobstrigger) is less than or equal to 40 meters and that the time is no more than lets say 100 seconds (feel free to change distance/time etc. (!alive bob) && (bob distance bobstrigger <= 40) && (time < 100) Alternatively if you want to make it that if he is dead AND (is either within 40 meters of the trigger OR the time is less than 100 seconds) then: (!alive bob) && ((bob distance bobstrigger <= 40) OR (time < 100)) Edited November 3, 2014 by Rejenorst Share this post Link to post Share on other sites
Gunter Severloh 4052 Posted November 3, 2014 A thread I made a while back for the !Alive may it help those who could use it: http://ironfront.forumchitchat.com/post/using-alive-check-in-a-trigger-for-objectives-6379390?&trail=15 Share this post Link to post Share on other sites
SilentSpike 84 Posted November 3, 2014 (edited) That did the trick. I wish I understood what all that did basically. I guess you wrote a small script and the trigger PLASMATRIG executed the script. Now what that script is telling the game to do I do not understand. Thank you for your prompt help. I really don't want to rely on others to solve my problems, so if you could give me a quick description of what you told the script to accomplish, that would be greatly appreciated to further the learning process. Thanks again. He told the trigger to activate when the variable PLASMAEND exists. He then set a killed event handler (basically the code inside the {} will be ran when the unit it is assigned to is killed) on bob which creates the variable PLASMAEND (it also broadcasts it to all machines incase the game is MP). Hence the trigger activates when the unit is killed. Edit: If you wish to understand more about Arma 3's scripting language I suggest you take a look at this wiki page. Try looking at the commands he used and see if you can understand what they do. If you have no previous scripting/programming experience you probably want to also check out the page on variables. Edited November 3, 2014 by SilentSpike Share this post Link to post Share on other sites