Home   Help Search Login Register  

Author Topic: Contingency Plans  (Read 485 times)

0 Members and 1 Guest are viewing this topic.

Knives

  • Guest
Contingency Plans
« on: 26 Nov 2003, 02:51:52 »
How do I make a script that if you have less then 3 soldiers in your squad
It would cancels all the waypoints and objectives then makes a waypoint to another extraction or something like that?

And just to let you know im new to all this scripting so please if you can be specific.

Thank you very much.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Contingency Plans
« Reply #1 on: 26 Nov 2003, 06:58:30 »
Okay, I'll try to be clear and do what I can.  :) I'm going to include links to the command reference for you to check out. I suggest you look at the official description of the command. I know it won't really make sense now, but trust me, looking at the sort of technical description of the commands will help you in the long run; especially when you can see how they work.

1) Make a trigger. The radius doesn't matter (just set it to 0). In the "activation" field the word "this" will be written. The trigger will go off once the condition in that field is met. "This" just means that the condition is the options that you selected above for the trigger (for example, east not present). We want our own condition to be when your squad has 3 or less men. None of the trigger options above will work, so delete the word "this". Replace it with this line:

( count units player) <= 3

That means that when the count of the units in the player's group is less than or equal to ("<=") 3, the trigger will go off.

2) Now we need to define what will happen once the trigger goes off. You said you wanted a new waypoint at the extraction site. This command will do that:

player move getpos Extraction

3) Now place a game logic where you want the extraction to be, and name it "Extraction"

4) Additional commands can be put in by separating them with a semi-colon ; For example, you could put this:

player move getpos Extraction; player sidechat "Let's get the hell outta here!"

As for the objectives, I'm not sure how much you know about objectives, so I can't help you now. Do you mean how do you place a little red "x" near the text in the notebook?

PS Did those links help? I'm trying something new, so I'm wondering if it is worth my time to hunt those links down. 8)
« Last Edit: 26 Nov 2003, 06:59:42 by General Barron »
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!