Jump to content
Sign in to follow this  
safari

Ending mission with triggers

Recommended Posts

I have a problem using couple of triggers when I tried to do a mission. I tried several hours to make them work and read some forums & stuff but there is something I just can't spot.

it was a senario where a team starts at their camp, then walk to enemy camp and kill enemy officer, then return to their own camp, and mission would end when they reach their tent. So no rocket science here, it is just me again biggrin_o.gif

But the mission always ended at same time when enemy officer died and both objstatus1 and objstatus2 showed up green.

I tried it like this:

trigger1

condition: !alive enemyofficer (officer not alive)

on activation: "1" objStatus "Done"

trigger2

activation "vehicle present" (player returns to his tent)

and I chose end#1 when player enters his tent area again after first leaving to the enemy camp.

I just can't remember  it crazy_o.gif so please tell it once more   biggrin_o.gif

Share this post


Link to post
Share on other sites

Okay i'm not sure if it's that the officer must get killed before the end trigger works when the player get's to the tent what your asking for but here goes:

In the first triggers  condition field put this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

not alive enemyofficer

You already have that as i saw.

In the on activation field put this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">endingtrigger true

The "endtrigger" name is just a name that you give for a variable that you want to be true for the ending trigger to activate once the player enters it. If the officer is not dead the ending trigger will not be activated and that means the mission won't end. You can name that variable whatever you want. Make sure that you set that variable to false in the init.sqs file. So this line would be in the init.sqs file

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">endingtrigger false

In the second trigger put the following in the condition field

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">not alive enemyofficer && endingtrigger

and set the type of the second trigger to end#1. Also make sure that it is activated by the side you want  wink_o.gif

Now the second trigger will only be activated if the enemy officer is killed and the right side is in the trigger. If the enemy officer hasn't been killed the player can jump high or low in the second triggers field it will not end the mission in any way.

Not sure if this is what you want, but well it's what i thought you wanted. Hope it helps.

Share this post


Link to post
Share on other sites

Thanks about your advice, I tried to follow them just as you told and it still didn't work. Mission ended at the moment that officer was shot, no time to return to my camp.

It is something obvious I just can't see (as usual smile_o.gif )

Mission needs Ciwil War Mod 1.1 if you wan't to look at it.

Go to http://safariofp.sphosting.com/addons/ and download file named TheAftermathCWGettysburg.zip

(endmission trigger didn't work no matter how I tried  so I just removed it)

Share this post


Link to post
Share on other sites

easy way to make it.

make a gamelogic at the tent

name it gl1

make a trigger far awy fro the mission zone on the water

name it trigger1

on condition u type

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">not canmove officer

then on activasion u type

trigger1 setpos getpos gl1

Share this post


Link to post
Share on other sites

This would be my solution. Should work 100%.

trigger1

condition: not alive enemyofficer

on activation: "1" objStatus "Done"; Obj1=true

trigger2, Covering the tent area, group it with player

group leader - present

condition: this and obj1

activation: EndMission1=true

trigger3

#end1

condition: EndMission1

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  

×