Jump to content
Sign in to follow this  
wikoli677

Advanced Trigger and Waypoint Help

Recommended Posts

I have searched around and cannot find the particular solution for something I am trying to get to work in a custom mission. I suppose my situation is somewhat specific and I'm not sure I can even get it to work without a specific script. I apologize in advance if what I'm looking for is here but my search was not adequate. :o

I've been toying with mission editing since OFP, but I don't know much about scripts or scripting...where they go...whether they are in particular files in the folder or if they are supposed to be placed in a particular field inside the editor screen. :confused:

Anyhow...the two things I am trying to work out are this:

1. I want a switch trigger to activate when multiple empty vehicles are all destroyed. The problem is that empty vehicles cannot be grouped or synchronized like other units. Right now I have separate triggers for each empty vehicle and even the triggers cannot be grouped or synchronized. What I would like is a single trigger that would only activate once all of them are destroyed...something like: 4 empty vehicles placed and once all are not present the single trigger activates along with a text effect that says "All targets destroyed". Right now I just have individual activations informing of each individual units destruction.

2. I have a couple soldier units that are in a cycle where they are driven around in a transport, unload, walk around, load back into the transport and drive around for awhile again. I have a trigger set up that if the opposing side is detected while this cycle is taking place, the cycle is broken and a new set of way points begins. My problem is that the soldier units may or may not be in the transport vehicle when the detection trigger goes off. What I want to happen is this: I want them to get into the transport vehicle if they are not already and continue on with the new waypoints BUT if they are already inside the vehicle I want both the transport and the soldier unit to ignore any command to load/get in and continue on with the rest of the new waypoints.

The problem I have with this right now is if they are in the vehicle already the transport stops at the new waypoint indefinitely and waits for the soldier unit that is already inside to get in as if it is not... I need something that will recognize whether or not the unit is already loaded.

Share this post


Link to post
Share on other sites

Just place this in the trigger cond box and replace unit1,2,3,4 with the name of the vehicles your using.

(!(alive unit1)) and (!(alive unit2)) and (!(alive unit3)) and (!(alive unit4)) 

The second one I'm not clear on but it sounds like you need to sync the trigger to the correct waypoint if all the men and crew of the vehicle are in the same group.

Share this post


Link to post
Share on other sites

{(_X in crew heli1)} count (units squad1) <= 0

From what I remember that checks to see if they are all out. heli1 being vehicle name, squad1 being group of the infantry. Im nto sure if that will work in this case though.

Share this post


Link to post
Share on other sites

The second one I'm not clear on but it sounds like you need to sync the trigger to the correct waypoint if all the men and crew of the vehicle are in the same group.

Some more detail on this:

I have a UAZ and a soldier placed separately and not grouped. The UAZ has waypoints to MOVE > TRANSPORT UNLOAD > LOAD > MOVE > CYCLE and the soldier has waypoints to GET OUT > MOVE > GET IN > CYCLE while both have the appropriate waypoints synchronized for this to work flawlessly. Now on top of this I have a detection trigger grouped/synchronized to the CYCLE waypoints of both units. Once the enemy has been detected the trigger activates and the CYCLE ends and leads to a new set of waypoints. The soldier may or may not be loaded when the trigger is activated and I want the waypoints after the CYCLE ends to function properly in either case. If the soldier is not loaded into the vehicle I want the vehicle and soldier to first do that and continue on and if it is loaded into the vehicle already I want both the vehicle and soldier to ignore any load order and continue.

I hope this clarifies better.

Share this post


Link to post
Share on other sites
{(_X in crew heli1)} count (units squad1) <= 0

From what I remember that checks to see if they are all out. heli1 being vehicle name, squad1 being group of the infantry. Im nto sure if that will work in this case though.

Would you place that in the detection triggers cond box.

I just did a test and even if you have two groups as long as the sync is correct the vehicle waits for the uints to get in.

Just read the above so it's an empty vehicle is that right, I think my test was a little different.

Re read it and it isn't empty as it has waypoints on it and the soldier.

As far as I can tell then it should work.

Edited by F2k Sel

Share this post


Link to post
Share on other sites
Just read the above so it's an empty vehicle is that right, I think my test was a little different.

The driver stays in the UAZ at all times. Only the separate soldier gets in and out.

EDIT: Oh also, yes, the vehicle waits for units to get in when sync'd correctly, but the problem is it still does it if the unit is already in...so they just stay parked forever.

BTW, thanks for the replies so far guys.

Edited by wikoli677

Share this post


Link to post
Share on other sites

I'm not sure I can help, my pc doesn't like this and keeps crashing even more than normal.

I tried Jakerod's idea and had to change it a bit, I placed in in a trigger cond box and set the names for my use .

 this and {(_X in crew uazname)} count (units squadname)  >= 2 

It counts the number of units in the vehicle (2 units in vehicle driver and soldier) and the enemy to be detected and only then does it switch the trigger.

The problem here is that it won't go and pick the soldier up directly it will wait for the him to get in normally.

Share this post


Link to post
Share on other sites
I'm not sure I can help, my pc doesn't like this and keeps crashing even more than normal.

I tried Jakerod's idea and had to change it a bit, I placed in in a trigger cond box and set the names for my use .

 this and {(_X in crew uazname)} count (units squadname)  >= 2 

It counts the number of units in the vehicle (2 units in vehicle driver and soldier) and the enemy to be detected and only then does it switch the trigger.

The problem here is that it won't go and pick the soldier up directly it will wait for the him to get in normally.

That might just work! I'll give it a test and report back here when I have a chance. I don't mind if they have to go meet the vehicle where ever it is at to get in....so if it works it'll be just fine.

Share this post


Link to post
Share on other sites

You may need to adjust the number of units your checking.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Still no luck... quick question: where should I be putting this code?

EDIT: Nevermind! IT works flawlessly now. Thanks, guys! Much appreciated.

I put the code into Condition field of the CYCLE waypoint of the vehicle.

Edited by wikoli677

Share this post


Link to post
Share on other sites
Still no luck... quick question: where should I be putting this code?

EDIT: Nevermind! IT works flawlessly now. Thanks, guys! Much appreciated.

I put the code into Condition field of the CYCLE waypoint of the vehicle.

Glad you got it sorted, I did eventually get it to work with just triggers and no conditon code but it's very complex as it requires multiple switch triggers and two getin points for the soldier.

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  

×