Jump to content
Sign in to follow this  
Militant

End Condition, OBJ destroyed and % of enemy KIA?

Recommended Posts

So, I am using Olsen's framework, and I am wondering how to adjust the endConditions.sqf so that not only do a certain amount of enemy need to be KIA, but also an ammo crate needs to be destroyed for the endConditions.sqf to activate.

 

Right now I am using the default Olsen's framework endConditions.sqf which looks like this:

 

_westCasualty = "USMC" call FNC_CasualtyPercentage; //Gets the casualty percentage of team "USMC"
_eastCasualty = "VDV" call FNC_CasualtyPercentage; //Gets the casualty percentage of team "VDV"

if (_westCasualty >= 50) exitWith {
    
    "VDV DECISIVE VICTORY<br />USMC has retreated due to casualties." call FNC_EndMission;
    
};

if (_eastCasualty >= 75) exitWith {
    
    "USMC DECISIVE VICTORY<br />VDV has retreated due to casualties." call FNC_EndMission;
    
};


if ((time / 60) >= FW_TimeLimit && FW_TimeLimit != 0) exitWith { //It is recommended that you do not remove the time limit end condition
    
    "TIME LIMIT REACHED!" call FNC_EndMission;
    
};

sleep (60); //This determines how frequently the end conditions should be checked in seconds

 

 

So how do I adjust this?

 

The crate I am using located in the editor is the

SIDE: Empty,

CLASS: Ammo,

UNIT:  Launchers CSAT

and I have it named as Stinger1.

 

I have tried some methods, but no joy. I Figure instead of doing trial by error, I'll just ask and hopefully a solution has popped up by time I check the forums again and have time to screw around with Arma editor. Help appreciated.

Share this post


Link to post

Try:

if ((_westCasualty >= 50 && !alive Stinger1)) exitWith {
    
    "VDV DECISIVE VICTORY<br />USMC has retreated due to casualties." call FNC_EndMission;
    
};

Share this post


Link to post

Cool thanks man, I put it in like this

 


if (_eastCasualty >= 75 && !alive Stinger)  exitWith {
     
    " USMC DECISIVE VICTORY<br />VDV has retreated due to casualties." call FNC_EndMission;

 

 

 

and it seems to work.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...