PDA

View Full Version : SAR/Agent dropoff/pick up script



♣_Spiritus_♣
Sep-21-2014, 19:54
So Im making some progress in this and figured I'd share my ideas to see if anyone can see problems. Sorry but I can't test these without the game so I figure I'd ask to make sure Im not going down wrong paths. Im not asking for people to test these just wondering if anyone can see any holes in them.

To "rescue" a downed pilot:

I set the trigger radius to as small as I can get it (around the area of the downed aircraft), but a plane can still fly through it to cause the trigger to fire. To get around this and thus forcing the plane to land and sit for X amount of time, I can add a "timeout" to that trigger. Does anyone see an issue with this workaround? I assume timeouts can work on triggers since they can delay submissions. Am I correct? If so, then if I add a timeout of 20 seconds, it would effectively make flying within that small of a radius impossible, thus forcing the rescue aircraft to land and taxi to the downed aircraft and wait.

I can use the same idea for returning to base and in the briefing take care of which field the plane has to return to. (If someone doesn't bother to read the briefing then thats on them when they don't get the mission success)

To add interest and hinder cheating from either side, I can create 10 different sub-missions which are the same but just change the location of the pilot and randomly pick which submission launches when any aircraft enters a huge radius based trigger.

The hurdles I can't seem to get past are the following:

1) Having the aircraft ID stored so whoever lands and picks up the pilot is the same one that can only fire the second trigger at the friendly airfield.
2) Only allowing Blennies to be the rescuing aircraft. Is there a type of aircraft line I can add to the trigger to only allow the trigger to fire if the proper plane passes through it? I feel if you can delay a trigger this shouldnt be an issue.
3) If the aircraft that rescues the pilot gets shot down going back home, how to reset the trigger to allow for more attempts.
4)Getting all of this to trigger a mission objective based trigger, thus helping to roll the map

If we can get something working for the above four issues I think I can have a working script for this element in December. :P

Salmo
Sep-21-2014, 21:53
.... <snip>
1) Having the aircraft ID stored so whoever lands and picks up the pilot is the same one that can only fire the second trigger at the friendly airfield.
2) Only allowing Blennies to be the rescuing aircraft. Is there a type of aircraft line I can add to the trigger to only allow the trigger to fire if the proper plane passes through it? I feel if you can delay a trigger this shouldnt be an issue.
3) If the aircraft that rescues the pilot gets shot down going back home, how to reset the trigger to allow for more attempts.
4)Getting all of this to trigger a mission objective based trigger, thus helping to roll the map

If we can get something working for the above four issues I think I can have a working script for this element in December. :P

Your mission scenario is most interesting. Unfortunately, the functionality your after is beyond the scope of what can be achieved using triggers. You'll have to use C# scripts.

1. Store the aircraft ID (the aircraft in-game name) in a global variable. Then use the OnAircraftLanded event to test if the correct rescue aircraft has landed at the right base.
2. You can also test that the rescue aircraft is of type blennie. string type = aircraft.InternalTypeName(); // eg type = "bob:Aircraft.Bf-109E-3"
3. Do you really want to do this? Wouldn't the mission be lost of the resue aircraft was shot down on the way home?
4. Try using scripts, not triggers.

♣_Spiritus_♣
Sep-21-2014, 22:23
3. Do you really want to do this? Wouldn't the mission be lost of the resue aircraft was shot down on the way home?
4. Try using scripts, not triggers.

Thanks for such a quick response. As far as your 4, you are spot on there, not sure why I said to use a trigger there. Duh! On that note, when I say trigger I do know you have to have the corresponding script. So the "timeout" would be added to the script that is controlling the trigger I placed in FMB.

And your third point is interesting. I keep going back and forth on this one. I agree with your point but if the aircraft was shot down then the overall mission couldn't be completed or map couldnt be rolled (if I was including that as an objective). A way around this is not to have it part of the overall mission objectives although what incentive would there be to complete it then? Unless I can get the script for adding/subtracting things from sides if this was completed/thwarted, aka if the rescue is successful then that side gets another spawn point close to an objective and the other side loses something.

Since this is a new type of mission/objective not seen in missions yet, I think allowing for it to reset would be entertaining. I know it would be weird to see the "General ___ and classified documents have been picked up" trigger in the text, then have that plane shot down and have a "Rescue attempt" failed text appear, then repeat....

I keep leaning to having it reset since it could become a really fun objective for both sides to either accomplish or defend.

SoW Reddog
Sep-22-2014, 04:18
Why couldn't the map be rolled if it were dead?

♣_Spiritus_♣
Sep-22-2014, 12:44
If the part of the maps "objectives," or the ones that must be completed to "roll the map" include a successful rescue, then if the rescue attempt fails and the plane gets shot down, there would be no way for that side to win the map.

RebelSqurl
Sep-22-2014, 14:42
If the part of the maps "objectives," or the ones that must be completed to "roll the map" include a successful rescue, then if the rescue attempt fails and the plane gets shot down, there would be no way for that side to win the map.

There is one way I can think of to get around this: Don't require EVERY target objective to be achieved in order to win the map. This is true on Fall Rot, where the Allies, for instance, apparently only need to knock out every target Axis airfield and at least ONE of the ground target objectives to "roll the map". (I've seen this happen!) So if you require say, "X-2 objectives completed to win", if the rescuing plane gets shot down, you could still turn the map by achieving all but one of the other objectives.

♣_Spiritus_♣
Sep-22-2014, 16:50
@Reb, good idea. I like that approach.

Maybe have another target that would have to be taken out if it fails but if the SAR is a success then that target becomes optional.

Thanks, you just added to my list of scripts I have to learn. haha.. although Fall Rot is Gruber's baby isn't it? Maybe I can ask him.

:salute:

♣_Spiritus_♣
Jul-18-2016, 00:14
Thanks to Salmo, Colander, SoWReddog, and Freya, we almost have this working. I'm hoping to have it good to go soon and use it in my next mission Operation Steamworks, for both red and blue sides. Should add a new dimension on the server and just good fun to land a bomber in a field to pick up downed pilots or whatever and try to return to base unharmed.

Thanks again to the above mentioned, they have helped out immensely.

:salute: