Home   Help Search Login Register  

Author Topic: Helicopter Trigger (Script)  (Read 1984 times)

0 Members and 1 Guest are viewing this topic.

Neal

  • Guest
Helicopter Trigger (Script)
« on: 04 Jan 2004, 19:07:55 »
I want to have a trigger be activated when the WEST walk in to the area of the trigger. Then a helicopter comes in and picks them up and heads back to the base. Anyone help me here?
« Last Edit: 09 Jan 2004, 16:44:21 by Neal »

slowworm

  • Guest
Re:Helicopter Trigger
« Reply #1 on: 04 Jan 2004, 22:02:46 »
Make a textfile and rename it "transport.sqs".

Open it with notepad.

Paste this in:


helo1 domove getpos pickup

#loop
? (helo1 distance pickup <= 80): goto "land"
goto "loop"

#land
helo1 land "LAND"

~30
helo1 domove getpos helobase

#loop2
? (helo1 distance helobase <= 80): goto "land2"
goto "loop2"

#land2
helo1 land "LAND"
~40
helo1atbase = true

exit


What you need on the map:
-  a transport chopper named helo1
-  a H (at empty/opjects) or invisible H at base named helobase
-  a H or invisible H at pickup point named pickup

-  in your triggers "on activation" field paste []exec "transport.sqs"
   If you want repeated transports, write in the condition line of the trigger: this AND helo1atbase (and set the trigger to repeatedly, of course) And type in the init-line of the chopper: helo1atbase = true


You can use other scripts to respawn the chopper when detroyed, if you want repeated transports. Be sure to add helo1atbase = true in the right place (when the new chopper is ready) in that script.


cu slowworm
« Last Edit: 04 Jan 2004, 22:09:57 by slowworm »

Neal

  • Guest
Re:Helicopter Trigger
« Reply #2 on: 04 Jan 2004, 23:25:47 »
With the "repeated transports" Does that mean its going to go back and forth?

I did all of that up there and the chopper does not move. ( I have the pick up and helo base a little close but still pretty good gap. I am testing them )

I have a H- helobase
Invis H- pickup
Heli- helo1
« Last Edit: 04 Jan 2004, 23:34:06 by Neal »

slowworm

  • Guest
Re:Helicopter Trigger
« Reply #3 on: 05 Jan 2004, 07:52:55 »
Repeated transports means: Every time WEST units are present within the trigger area and the heli is at base, it will come to provide pickup, wait for some seconds and return to base.

I retested it (my first test mission was'nt exactly the same, I had a moveable pickup-point). It works.
I assume it is the trigger. Did you set it up correctly?
It needs to be WEST PRESENT
If you don't want repeated pickup, the condition line should just be: this

For repeated pickup the condition line should be: this AND helo1atbase (and the trigger needs to be set to "repeatedly"). This means the trigger will just be activated when helo1atbase is "true" meaning the chopper is at base and ready. You will need to set helo1atbase = true at start or the trigger will never be activated (for repeated missions). Just write helo1atbase = true in the init line of pickup-H(or invisible H). Maybe its better then in the init-line of the chopper.

The on-activation line of the trigger shall be [] exec transport.sqs in both cases.

I did take a WEST/AIR/UH60MG chopper.

Did you enable view of all file extensions in windows folder options? If not you will make a "transport.sqs.txt"-file instead of "transport.sqs"

I will e-mail you an example mission.


cu Slowworm
« Last Edit: 05 Jan 2004, 07:57:45 by slowworm »

Neal

  • Guest
Re:Helicopter Trigger
« Reply #4 on: 06 Jan 2004, 02:21:21 »
I have everything like that but it dosent work. Could you send me your mission in .intro? neal101st@yahoo.com

Neal

  • Guest
Re:Helicopter Trigger
« Reply #5 on: 09 Jan 2004, 16:42:39 »
I sent you an e-mail back. Did you get it? The helicopter does not go back it just lands.

slowworm

  • Guest
Re:Helicopter Trigger (Script)
« Reply #6 on: 11 Jan 2004, 14:04:40 »
Sry for late reply, I was away from home last week.

Strange. It works fine here. The helo shuts up engine when landed (didn't manage to prevent this) but restarts engine after the given delay time and gets back to base.

What version of ofp do you use?
I have OFP 1.91


cu slowworm
« Last Edit: 11 Jan 2004, 14:04:56 by slowworm »

Neal

  • Guest
Re:Helicopter Trigger (Script)
« Reply #7 on: 11 Jan 2004, 18:13:52 »
I have 1.9 but I might as well update it. Also is there a way to keep the engine going? Or to have it start back up faster?

Also could anyone make me a script where a helicopter takes off then lands somewhere for oh say 5 seconds. Then takes off back to base lands there for 10 seconds. Basically going back and forth over and over. Like if you have seen We Were Soldiers that is what I mean. With the helicopters loading up then dropping them off. Then picking them up at the LZ and then dropping them off at the main base.

dai007

  • Guest
Re:Helicopter Trigger (Script)
« Reply #8 on: 20 Jan 2004, 00:29:12 »
im using v 1.46 of OFP CW.

Cant get this to work either. Can u send me example mission to..

itzdaman_2k3@ntlworld.com :o

Thnx

dai007

  • Guest
Re:Helicopter Trigger (Script)
« Reply #9 on: 23 Jan 2004, 23:56:27 »
Hey everyone, mines working fine now...

I need a Respawn for the helicopter when it gets shot down.. ive looked at other vehicle respawn scripts but cant get them working. Plz  help !