Welcome to the Iron Front Fan Forums!
Sign up Latest Topics

  Author   Comment  

Avatar / Picture

Retired Admin/IFR
Posts: 455
Reply with quote  #1 
This is something thats got me intrigued as I don't really understand it, but seems like something that could be useful. The original thread is in the official Ironfront forums here:-

But I also have it below, would it be possible for someone that understands it to reply with a noobs guide to it

Blackfox34 asks:-
         Detection System/ Trigger state
Posted this on the BI forums as well. I'm working on this for a new SP/COOP Iron front mission

I'm trying to make a mission where you play as a Sniper team and you have to take out a target.

I've finally got it working so that when you fire near the target he flees and will try to escape - if he escapes that will lead to failure.

However, I'm trying to add another element of failure to this mission by getting detected before the HVT arrives at his target. If detected before the HVT arrives, I want the mission to fail completely. However, if dectected by a missed shot or when the HVT arrives at his final location I want the mission to continue until he makes a full escape.

So far this is my initial detected trigger (BEFORE HVT arrives at location)

objfail = true; publicVariable objfail; hint "You have been detected the meeting is off!";

where Objfail is the condition of a forceEnd failure

Basically my question is - how can set a condition on this so the mission doesn't end if the player misses his shot and is detected once the HVT has arrived.

I suspect I need to making something false/true via the init and once the HVT arrives at his target make that the opposite, but I am lost on the exact wording and code.



I've also tried this which doesn't work.

My original trigger still fires upon detection.

I tried reversing the code so that :

Init of HVT
this moveInCargo vehicle; this addEventHandler ["firednear" ,{obj3 = true; publicVariable "obj3";}]; hvtnotpresent = true;

then trigger

BLUFOR detected by OPFOR


on actviation
hint "You have been detected the meeting is off!"; objfail = true; publicVariable objfail;

then on via a waypoint I have this to trigger that he has arrived and therefore you are allowed to be detected leading to his escape if you miss.
vehicle engineOn false;hvtnotpresent = false; hint "The general has arrived..get ready to take the shot";

However this causes mission failure upon loading.

Just for knowledge my other trigger is this that activates when a shot is fired near the HVT to cause him escape and works fine.
obj3  AND alive HVT

hint "You have been detected, Elminate the General before he escapes!";

Basically I just need a to set up the condition of my USSR detected by Germany trigger to only be true when the HVT IS NOT in the area

Next Blackfox34
Well the Sniper in this case will be Russian. Basically the hVT is to attend a meeting and the Sniper is to take him out.

My triggers are set that if the Sniper is detected before the HVT arrives at the meeting then the meeting would be called off (Instant mission failure). However, I want this trigger to deactivate when the HVT arrives at the meeting place so that if the Sniper misses his initial shot, he still has a chance to kill the target without the mission failing. (This part works flawlessly, I just need the USSR detected by Germany trigger to stop!)

Proftournesol says:-
My first guess is that your boolean variable (such as hvtnotpresent) must be initialized BEFORE the mission start, in an init.sqf file for example (ie, set to true or false in this init file).

Blackfox34 [SOLVED]
Thanks I got it to work finally.

If anyone is guessing I had to add another variable to detection.

So in the trigger when USSR detected by Germany:

detected = true; publicVariable "detected";

In a seperate trigger with condition:

detected AND hvtnotpresent

My init.sqf

hvtnotpresent = true;
publicVariable "hvtnotpresent";

Previous Topic | Next Topic

Quick Navigation:

Easily create a Forum Website with Website Toolbox.