Jump to content
Duke101

trigger condition time...end mission

Recommended Posts

Hello,

Hoping someone can help.

I have a mission where at the end there is an opfor counter attack. I would like to endmission after a certain amount of time i.e. they have held the enemy off and survived, for 10 mins or whatever and then mission complete comes up.

So basically I want the trigger condition to be met after a countdown, with endmission, etc on act. I seem to recall something like elapsed time, I can't think/remember how you do it (I THINK it's possible).

Any know or have any suggestions please?

Thanks!

P.S.

just to be clear I know there is a timer countdown option in triggers, but it's the condition in time I'm looking for. thanks

Share this post


Link to post
Share on other sites

Why not have a call to a short script after the Opfor counter attack begins (assuming your using some sort of triggering mechanism for it), so the script would look like this:

sleep 600;

endMission "END1"; //or whatever you are using to end your mission

Share this post


Link to post
Share on other sites

Just name the trigger that starts the opfor counterattack and then in a new trigger make the condition:

triggeractivated opforcounterattack

and set the count down as per usual.

Share this post


Link to post
Share on other sites

If you want a streamlined ending:

< Trigger 1 (Winner's trigger) >

Condition:

this && {someWinningCondition}

Timeout:

[600, 600, 600]

onAct:

["winner", true, true] call BIS_fnc_endMission;

< Trigger 2 (loser's trigger) >

Condition:

this && {someLosingCondition}

Timeout:

[600, 600, 600]

onAct:

["loser", false, true] call BIS_fnc_endMission;

Description.ext

class CfgDebriefing
{  
class winner
{
	title = "Mission Completed";
	subtitle = "";
	description = "You have successfully held off the enemy forces.";
	pictureBackground = "";
	picture = "b_inf";
	pictureColor[] = {0.0,0.3,0.6,1};
};

class loser
{
	title = "Mission Failed";
	subtitle = "";
	description = "You have failed to hold off the enemy forces.";
	pictureBackground = "";
	picture = "o_inf";
	pictureColor[] = {0.0,0.3,0.6,1};
};
};

Edited by Iceman77

Share this post


Link to post
Share on other sites

Thanks a lot guys. Plenty to go on here.

What I like about these forums and the arma community is not only the shared knowledge, but also having another pair of "eyes".

it's appreciated.

Share this post


Link to post
Share on other sites

Hey, sorry to bring up an old post but Ive been hunting around and can't seem to find anything more relevant and since I'm not allowed to post yet...

 

I'm working on a mission with the Ravage mod where the player activates an object (a satphone) which results in the player being told they need to survive for 3 days until they get rescued.

 

So far I've made this: 

// May 10, 2008 14:00 [2008,04,10,14,00]

_start = date;

_Extractday = (_start select 2) + 3;

_start set [2, _Extractday];

hint Format ["Date of Extraction May %1th At %2:00 Hundred Hours", (_start select 2), (_start select 3)];

This allows the player to get an extraction date that is 3 days after whatever date or time they activated the object. The part I'm struggling with Is how to allow the player to check how long they have until they get extracted. I've tried some things like: 

player addaction ["Time To Extraction", {["Time left until Extraction %1 Days %2 Hours %3 Minutes", ((_start select 2) - (date select 2)), ((_start select 3) - (date select 3)), ((_start select 4) - (date select 4))]}];

As well as assigning a global variable to the date of rescue then calling the formula from another script but nothing works. It always returns an undefined variable _start  {["Time left until Extraction %1 Days %2 Hours %3 Minutes", ((#_start select 2) - (date select 2)) error. Im really pulling my hair out at this point.

 

If anyone can give me a hand that would be awesome.

Thanks,

Ian

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×