Jump to content
Sign in to follow this  
BF2_Trooper

Advice on my "Downed chopper pilot" rescue mission.

Recommended Posts

Hi, I've just recently begun dicking around the editor and have so far managed to create a mission in which this city is filled with around 60+ Opfor insurgents. There is four man team of Force Recon Marines along with a USMC motorized support platoon for BLUFOR. Somewhere in the city, I have placed a crashed Huey and four USMC pilots that are set to HOLD the position.

Now the closest I could get to make this about rescuing the pilots was by placing a small 30x30 END trigger around the crash site. The game would end if no BLUFOR were present in that area. This would force the Force Recon players to get to the crash site as quickly as possible. I have also placed another, even larger, END trigger that covers the whole city which would end the game when no OPFOR was present in that area.

So, what I'd like to do is for the Force Recon team lead to be able to gain control of the Pilots. After making the pilots part of the FR team, I'd like to be able to lead them to a safe area which would trigger an end to the mission ONLY IF the pilots are present in that area.

So my questions are -

  1. How do I make my FR team leader gain control of the pilots only AFTER reaching the crash site?
  2. How do I then make an END trigger for an area that would only end the game once the pilots are there?
  3. At the end of the game, how do I make it so that a scoreboard of breifing is brought telling me either that the pilots were killed, the pilots were save, or that all the insurgents were cleared from the city?

Also, does anyone else have any problem with make A.I.s fire on enemies from the crashed huey's minigun? I set one of the pilots on a GET IN NEAREST waypoint that points to the huey. He gets in the huey gunner seat MOST of the time. But then he simply does nothing afterwards. He'd just sit there turning the gun once and a while, but would not fire a single shot even after being shot at himself! I tried adding HOLD, GUARD and SEEK AND DESTROY to GET IN NEAREST but none of those extra waypoints would make him fire back with the minigun.

I would appreciate any advice you guys can give. Thanks.

Share this post


Link to post
Share on other sites

I like the idea, I had the same kind of mission in mind but instead you're the pilot. I'm going to leave that mission still I've made some "simple" ones though. I can't really help you but I've had the same people with the AI firing from the crashed heli. Also, I find it funny how the four people on board that heli survived the crash. xD

Good luck on getting the mission sorted though. =)

Share this post


Link to post
Share on other sites

1. Create a trigger, and group it to your FR squad leader... then set the trigger to be activated by any group member. In this trigger's activation field, put something like:

[pilotOne,pilotTwo,pilotThree,pilotFour] join (group _thisList select 0);

2. Make a similar trigger to point #1, with a condition, say, "pilotsRescued", and then in the trigger that executes the join command (e.g. the trigger mentioned in #1), add:

pilotsRescued=true; publicVariable "pilotsRescued";

3. Easiest way to do this is using the different numbered End types for a trigger. These can be defined in the Briefing.html, see here for more details.

Share this post


Link to post
Share on other sites

I'm working on similiar mission ATM (only much more complicated). I'll give you some advice once I get home.

Share this post


Link to post
Share on other sites
1. Create a trigger, and group it to your FR squad leader... then set the trigger to be activated by any group member. In this trigger's activation field, put something like:

[pilotOne,pilotTwo,pilotThree,pilotFour] join (group _thisList select 0);

2. Make a similar trigger to point #1, with a condition, say, "pilotsRescued", and then in the trigger that executes the join command (e.g. the trigger mentioned in #1), add:

pilotsRescued=true; publicVariable "pilotsRescued";

What kind of triggers would these have to be be?

Share this post


Link to post
Share on other sites

I wrote a script to "grab" captured friendlies into your group, even includes cool hand gestures, I'll post the code here when I get home.

Share this post


Link to post
Share on other sites

secure.sqf

_unit = _this select 0;
_player = _this select 1;

if(group _player == group player)then{
_gestures = ["GesturePoint","GestureHi","GestureHiB","GestureHiC","GestureFollow"];
_gesture = _gestures select (floor random count _gestures);
_player playAction _gesture;
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit setUnitPos "AUTO";
[_unit] joinSilent (group player);
_unit setBehaviour "AWARE";
_unit setCaptive false;
_unit removeAction (_this select 2);
};

And in init of each captive:

this setCaptive true; this addAction ["Secure Captive","secure.sqf",[],6,true,true,"","lifeState _target == ""ALIVE"""]

You probably don't need the enableAI and setUnitPos stuff depending on what you have them doing before picked up.

Share this post


Link to post
Share on other sites

Do I write these scripts on the triggers? If so, what type of triggers would they have to be?

Share this post


Link to post
Share on other sites
What kind of triggers would these have to be be?

You create a normal trigger, with your desired size, then you use the "Group" function (F2) to group the trigger to the lead unit of the group you want to activate that trigger. When you then open the trigger properties again, you get a new set of options under "Activated By" (things like "Group leader", "Any group member", etc.)

Share this post


Link to post
Share on other sites
1. Create a trigger, and group it to your FR squad leader... then set the trigger to be activated by any group member. In this trigger's activation field, put something like:

[pilotOne,pilotTwo,pilotThree,pilotFour] join (group _thisList select 0);

I created this trigger, grouped it to my team leader, walked up to one pilot and nothing happens. What am I missing? I set ACTIVATED BY - Any Group Member.

---------- Post added at 04:11 PM ---------- Previous post was at 04:09 PM ----------

secure.sqf

_unit = _this select 0;
_player = _this select 1;

if(group _player == group player)then{
_gestures = ["GesturePoint","GestureHi","GestureHiB","GestureHiC","GestureFollow"];
_gesture = _gestures select (floor random count _gestures);
_player playAction _gesture;
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit setUnitPos "AUTO";
[_unit] joinSilent (group player);
_unit setBehaviour "AWARE";
_unit setCaptive false;
_unit removeAction (_this select 2);
};

Is this to be written in the initialization field of my Force Recon guys?

Share this post


Link to post
Share on other sites

Okay, for now I've used the JOIN AND LEAD waypoint to allow the pilots to joing my group. I would still like to use that code though which seems like it would work better.

Share this post


Link to post
Share on other sites

Read Big's example again. The secure.sqf (large code part) is to be saved as "secure.sqf" in your mission folder. Then use the single line of code in your captive's init strings to enable them to be rescued.

Share this post


Link to post
Share on other sites
Is this to be written in the initialization field of my Force Recon guys?

It goes in a script called "sequre.sqf".

Share this post


Link to post
Share on other sites

Sorry if I misunderstand. Kylania mentioned secure.sqf is to be saved in my missions folder. I just wanted know if indeed this is something I would have to copy (as a text file) outside the game and then paste in my missions folder. I don't where in the editor could you write and save scripts other than in triggers, waypoints, and units.

I apologize if my noobishness is getting annoying! :D

Share this post


Link to post
Share on other sites

I've done another "quick and dirty" way for achieving my mission. I've place 3 different END triggers, one for each of the pilots (pilotOne, pilotTwo,pilotThree). Each trigger has on it's Condition field "pilotname In thisList;". Should work for the short term.

Share this post


Link to post
Share on other sites

Found a bug with my JOIN AND LEAD waypoint. For some reason, everytime I get injured and an AI takes command of the Force Recon guys, the pilots automatically join my group! It does not matter how far away my group is from the waypoint! As long as someone else in my group takes command the pilots join my group. This also happens if I switch to another member of my Force Recon group.

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  

×