Jump to content
Sign in to follow this  
tryteyker

Checking if units are alive

Recommended Posts

Hi,

another question.

I've been looking around, but couldn't find anything, because the only thing I found didn't work.

((!alive unit1) - ?!alive unit1 - !alive unit1 - (!alive unit1)

I have tried these four alternatives to check if any unit is alive.

It always says 'Type Bool, expected nothing'. I'm not certainly sure what this means. I found out what Bool is, but I did not find any way to make it work.

Appreciate it if you could help me out.

Oh god. PLEASE. I typed it in the 'On Act.' field instead of Condition field. I'm pretty much ashamed of myself right now. Very ashamed.

Edited by tryteyker

Share this post


Link to post
Share on other sites

what do you want to check exactly?

this checks if any of the unit is dead:

! (alive unit1) or ! (alive unit2);

this checks if both units are dead:

! (alive unit1) and ! (alive unit2);

lol s*** happens np

Share this post


Link to post
Share on other sites

Well, I got this:

!alive unit1 OR !alive unit2

I want either of them DEAD to initialize a helicopter support. When they enter the trigger, the helicopter support automatically gets triggered, as they're alive. Any way to only trigger it when either of them is dead?

Share this post


Link to post
Share on other sites

So you have an area trigger and you want it to activate if either unit1 or unit2 dies only within the bounderies of that trigger?

Share this post


Link to post
Share on other sites

It seems like I got it to work.

Unit1, Unit2, Unit3 and Unit4 board a HMMVV, go on patrol. They stop at a town. (Only problem here is the enemy has a 'Destroy' Waypoint INSIDE the town, but the enemy retreats too fast). Then, they'd eventually get in a firefight. One unit dies, helicopters start to arm up, fly there and blow everything up. Extraction takes place. Finished.

So, to prevent the mission from being endless, I placed a trigger at the area where the enemy is mostly if he retreats, so the helicopters get called in. Else, if any unit dies, they start up aswell and kill every OPFOR.

As for ShadowGuy, the units stay within the trigger at all times, defending it (It's a small building with civilians around), but the enemy AI is a huge problem. They don't engage, even if their Destroy Waypoint says 'Open Fire, Engage at will, Combat'.

Share this post


Link to post
Share on other sites
this allowFleeing 0;

Put this in the Initialization box of the enemy AI and it will stop them from fleeing.

A "GUARD" waypoint inside the town will keep the OPFOR group looking for and engaging the BLUFOR group in town until one group is all dead.

http://community.bistudio.com/wiki/Mission_Editor:_Waypoints

The trigger around the small building should be set to Activation: BLUFOR "Present", and the Condition: !alive Unit1 or !alive Unit2 or !alive Unit3 or !alive Unit4

Share this post


Link to post
Share on other sites

It indeed seems to work. I just got another problem, with the Helicopter support. I want it to stand on a landing space at the beginning of the mission, and only start to fly once unit1 or whoever is killed.

If I put in a first move waypoint, and link it to the trigger, the helicopters will start flying towards the first waypoint and THEN wait until unit1 or whoever is dead. Then, they proceed like they should.

Any idea on how to fix that?

Share this post


Link to post
Share on other sites

Try to connect with this trigger waypoint located almost in the same place as the helicopter (eg a few meters away from him) and the next waypoint place where helicopter has to fly when trigger is activated.

Share this post


Link to post
Share on other sites

If I practically place a move waypoint or load way point ontop of it, it'll still start the engine and fly.

Share this post


Link to post
Share on other sites

Prepared similar situation:

helitrigg.jpg

Trigger is activated when west is present. Until I'm not in its range, helicopter does nothing. When I enter in a trigger radius, helicopter takes off and flies to the next waypoint. It works every time. Many times I used this in my missions. If this does not work, it means that problem lies elsewhere. Maybe in trigger condition? Or maybe I misunderstood something...

Share this post


Link to post
Share on other sites
It indeed seems to work. I just got another problem, with the Helicopter support. I want it to stand on a landing space at the beginning of the mission, and only start to fly once unit1 or whoever is killed.

If I put in a first move waypoint, and link it to the trigger, the helicopters will start flying towards the first waypoint and THEN wait until unit1 or whoever is dead. Then, they proceed like they should.

Any idea on how to fix that?

The waypoint should be a hold waypoint synced to a trigger which needs to be set to switch in the type box.

cond !alive whoever

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  

×