Jump to content
Sign in to follow this  
_angus_

Trigger condition - !alive and location

Recommended Posts

Hi guys,

 

I've tried, but I can't work this out. I've created a mission where essentially you need to kill an enemy soldier, and then get to a location. When you kill the soldier, I used the !alive condition and some music plays, and a text message displays, telling the player where to go. This all works fine.

 

I then created a flag with an area at the appropriate location which creates a mission successful ending, but I need it to only work if the soldier has been killed. I tried putting in the same !alive NastyFellow in the condition box, but it did not work.

 

How should I accomplish this simple task?   :)

 

Thanks.

Share this post


Link to post
Share on other sites

Your first step is complete.  When the man is dead the trigger fires.

 

You need to add another command to that trigger.  Place a small item like a sandbag wall or something, way over on the other side of the map.  Name it .. sand1

 

Add a command to the first trigger :  deletevehicle sand1:

 

So, when trigger 1 fires, the sand bag is deleted.

 

Now for trigger 2:  Add a condition:  sandbag1 must be alive or the trigger will not fire.

 

What you get: Kill the man and trigger 1 fires. Walk to the other area and trigger 2 fires.    OR:   Don't kill the man, walk to area 2 and trigger 2 will not fire.

 

.

 

 

 

 

 

 

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Your first step is complete.  When the man is dead the trigger fires.

 

You need to add another command to that trigger.  Place a small item like a sandbag wall or something, way over on the other side of the map.  Name it .. sand1

 

Add a command to the first trigger :  deletevehicle sand1:

 

So, when trigger 1 fires, the sand bag is deleted.

 

Now for trigger 2:  Add a condition:  sandbag1 must be alive or the trigger will not fire.

 

What you get: Kill the man and trigger 1 fires. Walk to the other area and trigger 2 fires.    OR:   Don't kill the man, walk to area 2 and trigger 2 will not fire.

 

.

Thanks for the reply. I'm not quite getting it. I used a toolkit (tool1) and put deletevehicle tool1 in the on Act box of the trigger for killing the enemy guy, having placed tool1 way over yonder.

 

In the second trigger I put the condition !alive tool1 - thinking that if the player is at the location and tool1 is dead (deleted) the trigger will activate.

 

What happens is it activates as soon as I kill the enemy guy, before moving to the location. Sorry to be slow.  :)

Share this post


Link to post
Share on other sites

.

 

What happens is it activates as soon as I kill the enemy guy, before moving to the location. Sorry to be slow.  :)

 

 

"It activates"   I have to presume that "it"  means the second trigger.

 

The conditions of the second trigger must be:  Player is present AND toolbox is not alive.

 

You must have both conditions.

.

Share this post


Link to post
Share on other sites

"It activates"   I have to presume that "it"  means the second trigger.

 

The conditions of the second trigger must be:  Player is present AND toolbox is not alive.

 

You must have both conditions.

.

Yes, sorry, the 2nd trigger activates wth the first one, ending the game - I don't know the syntax for "Player is present AND toolbox is not alive."  other than put Blueforce present with the highlightable boxes - does it need to be actually in the condition box too?  :-/

Share this post


Link to post
Share on other sites

If your first trigger condition is

 

!alive whoever

then your second trigger condition should be 

!alive whoever && this

 

assuming your trigger is set to detect presence of your player

Share this post


Link to post
Share on other sites

>> then your second trigger condition should be 

>> !alive whoever && this

 

Many thanks guys, that did it - apologies for my complete thickness with this stuff.

Share this post


Link to post
Share on other sites

This might not be relevant anymore but a much easier way of doing this is to have your second trigger set up to fire when you enter its radius, you can do this by setting it to fire for BLUFOR present, or setting your character as the owner,  and then in the triggers condition box, set it up like this - !Alive Enemy1 AND this; doing this will make that trigger only fire when Enemy1 is dead and you are in the triggers radius.

Share this post


Link to post
Share on other sites

In trigger condition set this

 

{ !alive soldier_name && { _x distance (getMarkerPos "marker_name") < 20 } } count playableUnits > 0

check if unit dead and if any player 20m from maker then you can end mission

Share this post


Link to post
Share on other sites

Name your enemy enemy_1 and yourself man_1

 

then....

 

 

trigger 1 should have the condition regarding killing the enemy such as:

 

!alive enemy_1

 

 

trigger 2 should have a radius plus:

 

!alive enemy_1 && man_1 in thisList

 

 

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  

×