OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Boyce81 on 27 Feb 2005, 18:04:18

Title: NEED HELP WITH SCRIPT
Post by: Boyce81 on 27 Feb 2005, 18:04:18
Alright here is the script that I came up with.  I figured it would be kind
of simple,
Use the Armed MH-6 to shoot the tires out on a civilian car.  Once the car
comes to a stop, the helo would land near it.
But I am finding that the helo wants to keep moving on to the next waypoint.
I even tried synch'ing the scripting trigger to the waypoints
but that didnt work either.  Maybe getting the helo to stop and move to the
car is harder than I thought it would be.  Can someone please give me a detailed breakdown of what I am doing wrong and how I can fix it?
please email me at boycedaniel@yahoo.com
anyways,  here is the script

#start
_PC = (abs Speed PC)
_PCpos = (getpos PC)
_pcDAM = (getdammage PC)

? ((_pcdam <= 0.5) && (_PC > 5)): {littlebird1 domove _PCpos}
~3
? ((_pcdam <= 0.5) && (_PC > 5)): goto "start"

;and this is the part that tells everyone in the chopper to getout

#land
_dis = littlebird1 distance PC
? (_dis > 1) : {littlebird1 domove _PCpos}
@ (LittleBird1 distance PC) < 1

LittleBird1 land "Getout"
exit
Title: Re:NEED HELP WITH SCRIPT
Post by: macguba on 27 Feb 2005, 19:22:12
Getting choppers to land at all is difficult.     Try using a setWPPos command to move the waypoint to the right area.   Moving an invisible H in will help too.

There are scripts and tutorials in the Ed Depot to help with choppers.
Title: Re:NEED HELP WITH SCRIPT
Post by: 456820 on 27 Feb 2005, 19:24:22
you could use an extra script with

heliname flyinheight 0
~how ever long you what it to stay down
heliname flyinheight 50

or something like that because the helicopter cant go anywhere if its on the ground.
Title: Re:NEED HELP WITH SCRIPT
Post by: Boyce81 on 01 Mar 2005, 03:08:35
I will try it out

thanks for the help.  
to the moderator, sorry about the title, I didnt read the FAQ first