Jump to content
Sign in to follow this  
DNP

winning or losing a mission once a condition is met

Recommended Posts

I was wondering, would it be possible to win (or end) the mission once a vehicle is destroyed? Also, how can i make it so when all the players die they lose the mission and return to lobby?

Share this post


Link to post
Share on other sites

Yes, that is possible with a trigger checking for the damage done to the vehicle. You would first need to name that vehicle (for example: aTarget) and then have a check to see whether the amount of damage inflicted exceeds a certain value. For practical purposes 0.99 is a good level of damage as a damage value of 1 means that the vehicle is destroyed and will start to catch fire. Therefore the on condition field of the trigger should check for the following text.

(getDammage aTarget >= 0.99)

The type of trigger should preferably be set to End2: End1 is the default ending chosen when entering a cheat code and one should deny cheaters the satisfaction of getting the impression of mission success when doing so.

The missions in A2 end automatically when there are no playable units left, but it is good practice nonetheless to add a specific check. In the on condition field of the trigger put:

(count playableUnits == 0)

Here the type of trigger should be set to a differently numbered End than the other trigger, for example End3.

For debriefing texts one shopuld have corresponding entries in the briefing.html file.

Regards,

Sander

Share this post


Link to post
Share on other sites

Really appreciated dude, thanks a ton! One last question if you dont mind. (sorry for asking so many questions im new to the editor) is it also possible to not have ai come out of a vehicle once its disabled?

---------- Post added at 08:40 ---------- Previous post was at 08:30 ----------

Also, how would i go about delaying the playable units trigger, in my mission i have people being dropped off in a helicopter. the trigger seems to end the mission immediately. Im pretty sure if i delay it somehow it would work correctly.

Share this post


Link to post
Share on other sites

You are welcome.

Operation Arrowhead introduced a new setting for vehicles: allowCrewInImmobile

By setting this to true AI crew members will not automatically leave a vehicle which has broken tracks or wrecked wheels.

A delay can be set bij specifying a value to the Min, Med and Max settings for a TimeOut type, that will ensure it will only kick off once it has been true for a specifief amount of time (in seconds). You can read more about it on the BIS Wiki entry on triggers here.

Regards,

Sander

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
Sign in to follow this  

×