Home   Help Search Login Register  

Author Topic: land_chopper.sqs givin' me fits.  (Read 794 times)

0 Members and 2 Guests are viewing this topic.

Saintaw

  • Guest
land_chopper.sqs givin' me fits.
« on: 09 Mar 2003, 14:11:11 »
Thought I'd tweak it myself, but have now spent two evenings trying to get this right... am about to eat my hat.

I took snypir's land chopper script, merged pickup_dropoff.sqm with my own mission, edited the "test" (now called MyPLayer) unit, and it's call respectively... everything works fine.

I then started adding a couple of waypoints to the chopper (chopper1)... edited the triggers for landing (I now have 11 waypoints instead of 4, I edited the waypoints numbers)
IE in the Trigger activation field for WP 1 (NOTE: Am I getting this right that the waypoints Nrs are offset with those you call in the script? Like WP0 is called WP1 when calling the script?)
Code: [Select]
[chopper1,getwppos [group chopper1,2]] exec "land_chopper.sqs"; hint "Trigger to land Started";
Anyway, finaly managed to get it working, except for two things...

  • Chopper seems "lost" for a full minute after it picks the player up

it takes off, but waits for a minute before it heads to the next WP, it looks like it's looking for a way out. It's "wiggling" back & forth, turning around.
It will eventually get out of it, but you need to be patient...

I haven't synced that WP with anything else.
  • The chpper tries to land on hills or on trees (usualy fails at it too  :beat:)

I did set an "H", placed the WP on top of it, but it lands everywhere around it, not ON it...
[/list]

<sigh...>please help an old man loosing his patience :)
« Last Edit: 09 Mar 2003, 14:12:34 by Saintaw »

Saintaw

  • Guest
Re:land_chopper.sqs givin' me fits.
« Reply #1 on: 09 Mar 2003, 16:40:31 »
PS: Just tried it in MP, the dust script is not showing up on the client side?

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:land_chopper.sqs givin' me fits.
« Reply #2 on: 09 Mar 2003, 20:26:10 »
Hi Saw:
ABout WP offset: I don't know, but i would be surprised if there were such an offset.

helos and stuff:  Landing helos is a black art.  That's why SnYpir issued this script.
The best way to go is to keep things as simple as possible.

Waypoints: helos consider themselves "At" a waypoint when they're within something like 100 m (or 200).  So a bunch of waypoints one after another won't really work.  Hence the "lost" feeling.

Landing: when they get a "land" instruction, helos stop, then scan the ground for a suitable landing site. The AI prioritizes Hs.  So if you bring 5 Helos over a LZ with 5 Hs, and set up the waypoints so that each one is close to a certain H, what will happen is that all 5 helos will show up in the "Waypoint" area, which is say 100m from the center, and they'll try to stop.  If they're at the same altitude, collision avoidance will kick in, they'll turn the other way and probably hit each other.  The remaining helos will then pick the nearest H.  If you're lucky, these will be different Hs.  On approach, they'll get close and in the same altitude band, and collision avoidance will kick in.  THose helos will pop up, and then all will pick the same LZ.
If on approach, the helo decides it doesn't like the LZ (drift is taking it into a hill, or collision avoidance kicks in), it will "abort", flying up and landing somewhere else.


You just got to practice it.  For the Helo intro to "shortstraight", for example, I spend a couple of days fine-tuning it.


Dust in MP: yeah, you probably have to run a separate script to get it working client-side.  drop command doesn't broadcast.
« Last Edit: 09 Mar 2003, 20:28:30 by Dinger »
Dinger/Cfit

Saintaw

  • Guest
Re:land_chopper.sqs givin' me fits.
« Reply #3 on: 09 Mar 2003, 21:40:25 »
Thanks Dinger!

I've managed to minimise the "bobbing" effect by removing some extra choppers (non effected by the landing trigger), it still bobs, but less than before. I am still looking for a nice "flat" base in Jungle Everon (Req: I need a chainsaw unit mod for that map ... all the bases I found were in shallow ditches, or had trees all around 'em  :afro:)

Makes the mission a bit harder, since there is no air support at the LZ now  :'(
(I also noticed that if you set your transport chopper to "engage at will", it will hover & not land if it sees enemy units while in the "landing trigger" zone).

This is the 2nd mission I built so far, still trying to make it out alive myself when I test it ... to be continued :D
« Last Edit: 09 Mar 2003, 21:42:42 by Saintaw »

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:land_chopper.sqs givin' me fits.
« Reply #4 on: 09 Mar 2003, 22:59:23 »
Yeah for landings I usually do:
setbehaviour "CARELESS"
and
setcombatmode "BLUE" (never fire)
otherwise, yeah, once the AI finds out about an enemy, it goes into "engage" mode.
 
Play with snypir's script.  How I got mine into the LZ was using gamelogic waypoints:

A) at the initial waypoint (where you want to begin the landing sequence), exec a script on activation.

B) put the next waypoint for the (far) outbound leg.  I'm talking like IP/OP being 1km or more from the LZ

C) about 200 m away from the LZ, in the direction of the approach, place a gamelogic.  Call it "OuterMarker"

D) Put another gamelogic on the spot of the LZ (or maybe a little long), call it "LZ"

E) Place another about 200m along the egress direction ("Departure").

F) Have the script be something like:

MyHelo setflyinheight 25 (25 should be your Hard Deck for flight.  for more than one helo, I try to assign 10-m bands, e.g., 25, 35, 45, 55.  This prevents collision avoidance AI from kicking in.)
MyHelo LockWP TRUE
MyHelo domove getpos OuterMarker
MyHelo setcombatmode "BLUE"
MyHelo setbehaviour "CARELESS"
@(!unitready MyHelo)
@(UnitReady MyHelo)
;these two lines tell the mission to wait for the helo to chase after the outermarker, then, when it gets near the OuterMarker (or crashes) to continue
MyHelo setspeedmode "LIMITED"
;the helo will make a hard bank to slow down
MyHelo domove getpos LZ
MyHelo setflyinHeight 10
;determine treetop height along the approach route and keep this number above that. Also, with more than one helo, maintain 5 m vertical separation, or things get ugly.
?getdammage MyHelo > .9:Goto "Crashed"
@(!unitready MyHelo)
@(UnitReady MyHelo)
MyHelo setflyinheight 1
@(getpos MyHelo select 2) < 2
;helo is pretty low. now:

;to kick people out:
_FlightCrew = [(driver MyHelo, gunner MyHelo)]
{if !(_x in _flightCrew) then {unassignvehicle _x}} ForEach crew MyHelo
@"Alive _X" count crew MyHelo <= "alive _x" count _flightcrew

MyHelo setflyinheight 25
MyHelo domove getpos Departure
MyHelo setspeedmode full
?getdammage MyHelo > .9:goto "Crashed"
@(!unitready MyHelo)
@(UnitReady MyHelo)
MyHelo setcombatmode "Yellow"
MyHelo SetBehaviour "aware"
MyHelo LockWP false
exit

#Crashed
player sidechat "Oh no, MyHelo went down in a fireball"


this script isn't tested, but you get the idea

Dinger/Cfit

Saintaw

  • Guest
Re:land_chopper.sqs givin' me fits.
« Reply #5 on: 10 Mar 2003, 00:34:15 »
Wow, thanks Dinger, that'll keep me busy for another couple of evenings :D (I haven't used Gamelogics myself yet, I'll need to read up on that and it's differences with triggers)

I'll keep you posted in this thread.

Saw <--- off to bed now :)

Offline snYpir

  • BIS Team
  • ****
  • OFPEC Jedi Master
    • OFPEC
Re:land_chopper.sqs givin' me fits.
« Reply #6 on: 10 Mar 2003, 04:24:48 »
Thought I'd tweak it myself, but have now spent two evenings trying to get this right... am about to eat my hat.

LOL! ;D

After weeks of tinkering, fiddling and swearing that I would never try and land choppers ever again I finally gave up. Version 1.8 of the land choppers script was as close as I could come to managing the damn things without actually scripting the parabolic arc the chopper would follow to the ground, ie using setpos to guide the chopper down on a realistic path.

And fuck that I say.

Anyway, I am sorry the script is giving you grief. I have a more perfected version, and am using it here. This won't fix your waypoint problems though.

Sorry to be absolutely no help at all. Choppers suck. :-\
Bohemia Interactive Simulations

Dark Nova

  • Guest
Re:land_chopper.sqs givin' me fits.
« Reply #7 on: 10 Mar 2003, 07:49:43 »
i have been looking into this too, but from quite a different angle.
i found out that if the chopper is still, and is directly above a invisable H, it will land perfectly 95% of the time.

so i use a script that checks when the chopper is close to the land marker,
and then sets the posistion of the invisable H to the exact same position of the chopper, then makes chopper decent a little (using setVelocity[ 0, 0, -15])  then tell it to land there

you get a very vertical landing but its works fairly well, and fairly quick landings

will post full script when tested more

Saintaw

  • Guest
Re:land_chopper.sqs givin' me fits.
« Reply #8 on: 10 Mar 2003, 12:38:30 »
Don't get me wrong Snypir,
Your script works 1000% better than the default landing/pickup.
except for the bobbibg at the initial pickup waypooint, I've managed to get it working... using Dinger's "farp" advice. (It looks much better too!)

The other option was to use SEAL team insertion by boat, but hey... who wants to be a swabbie ;0)


I've just managed to get lost in the woods trying my own mission!, never accept any counsel I give here...
« Last Edit: 10 Mar 2003, 12:40:15 by Saintaw »