Home   Help Search Login Register  

Author Topic: Chopper quirks  (Read 483 times)

0 Members and 1 Guest are viewing this topic.

DCT

  • Guest
Chopper quirks
« on: 06 May 2004, 23:52:02 »
This is my first post, so be nice  ;)

I have two ai-piloted helicopters (in different groups) set to move to the same waypoint, which is an invisible H.   Only one of the choppers is scripted to land there, but both try to.   The original one correctly lands, but the other one takes off to the southeast and stops 500m away.

I want the second chopper to hang out and cover from above while flying, but it's bugging out every time.

I've tried:

disableai move
slowing the second chopper so it arrives later
having both choppers in the same group (the second chopper takes forever to get there!)
flyinheight (which causes my choppers to go into flat spins at the next waypoint... wierd)
moving the second chopper to a slightly different waypoint
etc...

I am convinced that the second chopper bolts because it want to land, but I can't be sure because I'm really, really new at scripting.    I've solved each problem I encounter as it comes up, but this problem has already wasted 7hrs...    Save me!

Just in case...   I've read the FAQ's, checked the other sites, and all that.   I just can't find anything on this.
« Last Edit: 06 May 2004, 23:56:37 by DCT »

Dubieman

  • Guest
Re:Chopper quirks
« Reply #1 on: 07 May 2004, 01:05:45 »
Jeez Macguba is missing out on all these new ppl to the forums! All new ppl always say be nice but in here the moderators with their beating sticks make sure that you don't get bullied, beaten up, verbally abused, harrassment, and losage of milk money. Anyways welcome!:cheers:

For the second chopper, you wanted it to just kinda hover or fly slowly around as cover basically right? Then instead of one waypoint for 2nd chopper make mulitple moves at limited speed around the position with a cycle waypoint and to move again there's a trigger related thing you can do, I'm not sure about that trigger thing though.
OR
If you know the approximate time of chopper 1 being on the ground and its for example its 300 ofp secs or five minutes. Then put that one Move waypoint for chopper two NEAR the landing place and not next to it cause friendlies tend to want to entangle choppers....
In the waypoint their should be a countdown or timeout part when editing the waypoint and it has three spaces called min max and middle. Put in 300 for each cause everything is done in secs. Then chopper 1 will land and do what you want and chopper 2 will move to the waypoint and hover there for 300secs. ;)

Hope it works:thumbsup:
« Last Edit: 07 May 2004, 01:08:42 by GuiltyRoachKilla »

Offline nEO iNC

  • Contributing Member
  • **
Re:Chopper quirks
« Reply #2 on: 07 May 2004, 08:24:29 »
Hey DCT, the trigger thing GuiltyRoachKilla is talking about is just a trigger of 'switch' type that is sync'd to the cycle WP.

Just create a trigger with the condition you want for the helos to fly off, then select 'switch' from the type menu, then goto the 'syncronize' menu in the editor, then click and drag on the trigger to the cycle WP for the hovering helo2 and the move WP that makes the helo1 land... That's it...

Just add additional waypoints for both after the cycle and move wps that are sync'd to the trigger so they go off and do what you want them to, where you want them to.


DCT

  • Guest
Re:Chopper quirks
« Reply #3 on: 07 May 2004, 17:37:57 »
Thanks guys...   From what you told me, I worked out a solution.   I didn't mention that the waypoints were all in script, but here's how I ended up making it work.   It uses the helicopter transport map click by skumball to get the transport helicopter (heli) to land and create the coordinates for landing.   hmove is the invisible landing h that moves to whereever you click on the map for pickup.

My script sends the support helicopter (heli1) with a pilot (support) and gunner to roughly the same location to orbit until the transport helicopter leaves.   It is executed from the helimove script which I will put down below.

here it is:

------------------------------------------------------------------------

~2

#hold

~2

?(heli distance hmove >300): goto "hold"

#route

_pos1 = getpos heli

_pos1a = [(_pos1 select 0)+60,(_pos1 select 1)-60,0]

heli1 Move _pos1a

@ (unitReady support)
_pos2 = getpos heli

_pos2a = [(_pos2 select 0)-60,(_pos2 select 1)-60,0]

heli1 Move _pos2a

@ (unitReady support)
_pos3 = getpos heli

_pos3a = [(_pos3 select 0)-60,(_pos3 select 1)+60,0]

heli1 Move _pos3a

@ (unitReady support)
_pos4 = getpos heli

_pos4a = [(_pos4 select 0)+100,(_pos4 select 1)+100,0]

heli1 move _pos4a

@ (unitReady support)
?(heli distance hmove <500): goto "route"

exit

------------------------------------------------------------------------------

It may not be the cleanest, but it works really well.
I added in a line for the support helicopter to return to base and land along with the transport helicopter so it can repeat again and again.

Here is the modified helimove script and the modified helibase script.

---------
;Helicopter Transport (map click) v1.0
;by Skumball (simongoddard4@yahoo.co.uk)

_pos = _this select 0

onMapSingleClick {}
2 setRadioMsg "Blackhawk back to base"

"blackhawk" setMarkerType "marker"
"blackhawk" setMarkerPos _pos
hMove setPos [(_pos select 0),(_pos select 1),0]

[_pos] exec "coords.sqs"
heliPilot doMove _pos
support Move [(_pos select 0)+70,(_pos select 1)+70,0]

@ (unitReady heliPilot) && ((getPos heli select 2) > 10)
~2
heli land "get in"

heli1 exec "patrol.sqs"

@ (unitReady heliPilot) && ((getPos heli select 2) < 1)
heliPilot sideChat "Ready"

exit


-------------------------

;Helicopter Transport (map click) v1.0
;by Skumball (simongoddard4@yahoo.co.uk)

onMapSingleClick {}
2 setRadioMsg "null"

"blackhawk" setMarkerType "empty"

heliPilot sideChat "Heading back"
support doMove getMarkerPos "home"
heliPilot doMove (getPos hBase)

@ (unitReady heliPilot) && ((getPos heli select 2) > 10)
~2
heli land "land"
@ (unitReady heliPilot) && ((getPos heli select 2) < 1)
heliPilot sideChat "Ready"

support domove (getpos base1)
@ (unitReady support) && ((getPos heli1 select 2) > 10)
~2
heli1 land "land"

exit