Jump to content
Sign in to follow this  
PhoenixFlameX

Switch Trigger, Way Point or a Script?

Recommended Posts

Hey guys.

I'm new to the forums and also new to the world of ArmA and OFP. I've only been playing for less than two weeks. I played through single player mode and a bit of multiplayer and bar a few little things, it's the best military style game I've ever played.

I threw myself into the deep end recently, though. I decided to try my hand at mission editing.

Now, I must have read every single tutorial available and I searched the forums from top to bottom, but there was just one question I couldn't get answered (this far).

(Sorry if this post drones on a bit, but there's a point, keep reading). I have a mission completely layed out with triggers, objectives and even an ending and a briefing screen. It runs fine.

I wanted my group (all AI at this point, I won't be a team leader) to mount a truck then proceed to a waypoint, get out, board a chopper, let the chopper fly to its destination with the group onboard, then land and let the group disembark. All that went fine. No hitches.

My problem lays in getting the group to follow some extra waypoints (to sabotage a few KA-50's) after they disembark the chopper. Honestly, the answer could be right under my nose, and if it is, my apologies. But I've searched far and wide for a solution, and came up with nothing.

The important thing to remember is that this will be an AI group and they're using waypoints to get into and out of the truck/chopper.

Any help is totally appreciated. Many thanks for reading.

Share this post


Link to post
Share on other sites

Are there any "not grouped with other squad" AI flying the chopper, driving the truck?

Do you have problem with the copper landing?

Otherwise just add some additional wps after the "get out" wp ?

If you want to dynamically add wps along the route, you will have to either script-add wps or try with switch triggers grouped with the wps.(hard to explain)

HOWEVER if there's a non grouped pilot flying the chopper and you want him to get back to some base or something, good luck of getting the units to unload properly on a dedicated server sad_o.gif

GG BIS pistols.gif

edit:

read my rant here...

http://www.flashpoint1985.com/cgi-bin....3;st=15

Share this post


Link to post
Share on other sites

The truck driver is in the group, but the Chopper pilot isn't in my group. He spools up the engine and waits for us to get in before he takes off.

Looks like I'll need to figure out some sort of trigger switch to add additional way points.

I'd like to get the chopper pilot to wait until we complete the objectives, then get the group to hop back on and return to base. That's why I need to learn how to somehow make a completely different set of way points for the team after they disembark the chopper.

So just to summarize what I would like to happen:

Quote[/b] ] "AI Team" -> "Get In Truck" -> "Move To Way Point 1" -> "Get Out Of Truck" -> "Get Into Chopper (pilot not in group)" -> "Chopper Moves To Destination" -> "Chopper Lands" -> "Chopper Unloads Transport" -> "Chopper Waits Until Team Is Finished" -> Team Resume Along Their Own Way Points And Complete Objectives" -> "Team Return To Chopper" -> "Chopper Returns To Base With Team On Board"

If anybody could suggest a way to create a new bunch of way points for the team once they disembark, I'd be really grateful.

Share this post


Link to post
Share on other sites
WarWolf @ June 02 2007,16:37)]http://www.ofpec.com/COMREF/letterT.php#unassignVehicle

http://www.ofpec.com/COMREF/letterN.php#orderGetIn

(and check toadlife's comments in that last one too)

Yeah, I might try use the Unassign Command to see if that makes a difference.

If it works, how can I give way points to the team after I unassign them?

Share this post


Link to post
Share on other sites

Hi Phoenix,

If you hold the cursor in the editor over the target you want destroyed right where the name of the unit lights up and drop a "destroy" WP right on the name the AI should destroy it and move on. You may have to use the dotarget and dofire commands to get them to kill it.

Share this post


Link to post
Share on other sites
WarWolf @ June 02 2007,16:37)]http://www.ofpec.com/COMREF/letterT.php#unassignVehicle

http://www.ofpec.com/COMREF/letterN.php#orderGetIn

(and check toadlife's comments in that last one too)

Yeah, I might try use the Unassign Command to see if that makes a difference.

If it works, how can I give way points to the team after I unassign them?

the enemy choppers, are they placed at a certain position or are they spawned randomly on the map?

as Op4 BuhBye said, you might want to add the "destroy" thingy, but if the soldier doesn't know how to attack the certain type of object it could be difficult.

I guess a soldier armed with a mg would attack the chopper(i.e be able to do damage on it) otherwise, you might want to have 1 or two AA missile soldiers in your team.

If the object are "unknown" i,e no side tagged on it you could try with the setFriendly command or putting an enemy soldier in the chopper and then force him out of it to "tagg" it as hostile to your other gang.

[edit]

I think only that the units who has passed "unassigned" WP will continue their journey if they are attacked confused_o.gif

I'll have to check this one out.

Share this post


Link to post
Share on other sites

It's a pretty messy situation. I'll figure it out, though.

If I drop a destroy way point on the enemy chopper it will apply directly to the chopper which is dropping my team off, if you catch my drift. I tried that already. I set another way point to seek and destroy, but instead of my team heading off to wreak havoc, the chopper took off, and then proceeded to fly around in circles, seeking and destroying nothing. (But that's a different matter).

What if I issue some sort of command through a trigger? Suppose I get a trigger to activate when the team disembarks, and in that trigger, I have the team destroy carry out their objectives? Could that work?

Really appreciate the help guys. And by the way Taurus... your sig is great!

Share this post


Link to post
Share on other sites

I´m a bit lost on the description of the actual problem.

Is the helo pilot part of the team when the group is supposed to head for the destruction of the helos ?

If so use pilot joingroup 0 at some trigger and check if the conditions are met once you want him to pick your guys up again. You can force the helo to the ground by using nameofhelo setfuel 0 and setting fuel to 1 again, once the objective is done or you could lock the helo waypoints by placing a condition in the waypoint setup that is set to true by triggers.

Share this post


Link to post
Share on other sites

The Helo pilot will be in a different group to the team. He'll just wait at the point where he landed for the team to come back (it's only a quick mission, so basically the team disembark and go destroy some enemy choppers and jets then return to their Helo and head home. The pilot stays in the cockpit the whole time).

The main problem is somehow getting the team to react to their own way points after they disembark. These way points need to be independent of the choppers' way points. But I'm having trouble doing that, because once the team is dropped off, there's no way to create a new path that applies only to them, and not the Helo.

Hehe, I won't exactly be winning any awards for clarity, but I hope I helped you guys understand the situation a little more, cause it's driving me nuts!

Share this post


Link to post
Share on other sites

http://img115.imageshack.us/my.php?image=missionexplainedji6.jpg

This is the general idea. So, I need the pilot to stay in the chopper the whole time. And somehow I need to make a bunch of new way points for the team when they hop out of the chopper so I can instruct them to do their duties.

Edit: Picture Didn't Post the First time

Share this post


Link to post
Share on other sites

confused_o.gif

Maybe its possible to

on the "transport unload" WP for the chopper you will have to put a condition, like "TeamInChopperAgain"

and put a trigger which has the "DestroyObj and ((count crew myChopper) = ((count units teamGroup) + 1))" as an condition.

Where "+1" is the original crew pilot + perhaps co-pilot.

When this condition is met: "TeamInChopperAgain=true"

To prevent the chopper to take-off before the units has done their duties, and got back into teh chopper.

Maybe its possible to place an "transport unload" WP and a "LOAD" wp next to each other.

You will need to "sync" the load wp with the teams "get in" wp.

(just browsing here, haven't tried it, but it might work)

Or try the switch trigger thingy mentioned here:

http://www.flashpoint1985.com/cgi-bin....t=63700

for the heli problem make a trigger and for type make it a SWITCH, then syncronize that trigger with the hold waypoint...now when the trigger is activated the pilots will continue to the next waypoint after the HOLD.

Share this post


Link to post
Share on other sites

Mission editing is a giant, giant learning curve, it seems. I'm learning though, which is always a bonus.

I'll need to play around with switch triggers, they seem like the way forward. The other day I tried to make a simple text-based mission, where an officer would call the player over, and when the player got closer to the officer, he issued further instructions to the player.

I set up two triggers which would activate when they detected BLUFOR presence. Basically the first one would fire when the mission begun - the officer would "dowatch" and call the player over. Then I set another trigger over the officer, which would also activate when the player stepped inside the radius. Both these triggers were connected to "Talk" way points.

So, the first trigger would set obj1c=1 when activated, the way point would then detect if obj1c=1 and would then trigger, thus displaying the "Talk" text from the way point. It worked fine until I made the second way point and trigger combo. For some reason the text didn't display properly when I got closer to the officer. In fact, the two waypoints just seemed to set off immediately.

I dunno - if anyone can point me to a fairly comprehensive switch trigger tutorial, I'd be delighted. And Taurus, thanks a million for all the help, you've been a complete gem. Fair play.

[Edit] Ironically, by reading over my post, I think I understand why the two way points played straight away. The answer being, because they are way points, meaning they're designed to play in a ream, or in other words, they fire one after another in quick succession. I did put obj1c=1 into the condition section of the way points, but it seemed to have no effect. Any other suggestions?

Share this post


Link to post
Share on other sites

I'll have a go at this tonight or later this week to see what I can come up with, I can't promise it will work in a dedicated server environment tho'

And, no problem at all wink_o.gif

We're all here to help, or at least getting bald(er) whilst trying

Share this post


Link to post
Share on other sites

I guess we could be helping in a very short time if you could upload the editor version of the mission(s) in question.

Sometimes it´s hard to explain things and much easier if we can actually look at the map/mission. Comments via markers in the map wouldn´t hurt aswell.

Share this post


Link to post
Share on other sites

Good point Balschoiw. Exactly where are user files saved to?

And when you say markers, do you mean just lay a marker down next to anything that needs explaining and include a short text description?

I'll do it as soon as I know how to wink_o.gif

Share this post


Link to post
Share on other sites

The missions that you save in editor are saved in :

c:\documents and settings\your windows user name\MyDocuments\Arma other profiles\your arma user name\missions

On top of my head though as i´m not at home. Locate the mission folder, zip or rar it and either upload it to a free hoster or send me pm if you want to send it via mail.

Quote[/b] ]And when you say markers, do you mean just lay a marker down next to anything that needs explaining and include a short text description?

Exactly, makes it easier to check the relevant parts and saves time.

Share this post


Link to post
Share on other sites

Brilliant. I'll get cracking on the markers as soon as I can, and then I'll host it somewhere.

I really appreciate the time you're taking to help out here. I'll post here when the User File is all set up and ready to be examined.

Share this post


Link to post
Share on other sites

Here it is, guys.

Once again, much obliged! Feel free to PM me if you have a question. I hope it's laid out okay. I included a short ReadMe too just to tie up any loose ends.

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  

×