Jump to content

Scripting Extractions


standalone

Recommended Posts

Hi,

I have been trying to script a triggered extraction in VBS where if the player's group enters the trigger's zone then the helo:

1) Takes off

2) Flies to the zone

3) Lands

4) Waits for the players group tp board the helo

5) Takes off and flies back to base

So far the trigger works just fine, the problem is with steps 3 and 4. I have looked at many tutorials relating to this and nothing seems to work, I have played with different commands for the initialization and the condition fields for waypoints, I have tried setting group ID's for the players group but nothing seems to work, I still have problems with the helo taking off and compeletely ignoring the fact that the troops arent on the helicopter.

So I was wondering if anyone here has found a combination of commands that work?

I am not getting any responses on the VBS forums. :wall:

Link to comment
Share on other sites

I still have problems with the helo taking off and compeletely ignoring the fact that the troops arent on the helicopter.

OK here's the best way to do it.

Lets say the waypoints you have setup for the chopper are:

starting pos - the base (waiting to be called)

WP1 - fly to the pickup point and load the troops

WP2 - fly back to base with the troops

To make the chopper wait at the pickup point until all troops are onboard, create a trigger - activated by gamelogic, type switch. In the condition field of the trigger type the following:

dude1 in chopper && dude2 in chopper && dude3 in chopper

Where dude1, dude2 etc are the variable names for your troops and chopper is the variable name for your well....your chopper.

click OK to close the editing box and then select synchronise from the menu. Drag a line from the trigger to the WP1 - you have now synchronised the waypoint with the trigger. What this does is that it waits for the condition to be met (dudes in chopper) before taking off to it's next waypoint.

To drop troops off, you would do the reverse ie !(dude1 in chopper) && !(dude2 in chopper) etc. That way the chopper waits until all have exited the bird before flying to the next WP.

This doesn't account for troops that may have been KIA during the mission, so you might want to also add an !alive dude1 etc check as well.

I also have been playing with the following code I found at the resource sight, but whilst the syntax looks like it should work, I have encountered a few issues.

{_x in chopper}count units GroupName==count units GroupName

In theory, this should check that the number of units in "GroupName" left alive are equal to the number of units currently in the chopper. Theory is great, but unfortunately it doesn't seem to work properly yet, although it just might be an issue with my group naming.

Anyway - the first answer does work as I have used it many times before.

Cheers, :thumbsup:

Link to comment
Share on other sites

HELO script

This Script i think is exactly what u are looking for

Have fun :rocky:

Features:

-Pickup troops at one LZ, fly to a second LZ, land and disembark troops, then fly to and land at a third LZ.

-Pickup troops at one LZ, fly, land, and disembark troops at a second LZ.

-Pickup troops at one LZ, fly to second LZ, drop troops by parachute, then fly to and land at a third LZ.

--Perform the above but starting in the air with troops already aboard helicopter.

-Perform the above but starting on the ground with troops nearby, or aboard helicopter.

Edited by Geriec
Link to comment
Share on other sites

Thanks for all of your replies guys

:thumbsup:

I eventually got everything to work after much trial and error and ended up with a very fun and tactically challenging mission.

(though I may be exaggerating a bit because it is my first experience with a mission that works from start to finish) :P

My mission starts with a fastrope insertion, then my squad moves to the city, clears and holds the city during a siege, then moves to extraction (where there are a few lil' OPFOR surprises). Then I have a scripted HELO extraction.

The mission ends as a success if you make it back to base after extraction.

It ends as a failure if any of your squadmates are killed.

(that is the challenging part)

I am loving VBS and haven't even done the multiplayer yet!!

:D

Oh, by the way, all of this is happening while little birds are providing close air support, it's such a rush when one flies over your head and you hear the miniguns firing..... it's just toooo cool!! :D

Edited by standalone
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...