Home   Help Search Login Register  

Author Topic: my heli sentry/airlift script won't work on Malden  (Read 572 times)

0 Members and 2 Guests are viewing this topic.

Offline Hauk

  • Members
  • *
  • I sail under the Jolly Roger!! Pirates are kings!!
my heli sentry/airlift script won't work on Malden
« on: 16 May 2004, 13:13:07 »
Hey all,

I have a similar post to this in the Editing/Scripting:General section but haven't got a reply in days so I thought I'd post it here.
I tested the following code on Desert Island and it worked fine but when I went to test it on Malden the chopper refused to come to my position and just hovered around one of the game logics.
The game logic "setmove" is a position for the chopper to begin his descent down to me without crashing into buildings or getting caught up in trees.
Please post any info that you think might be useful as it would be much appreciated.

Code: [Select]
_chopper = _this select 0
_paradrop = 1
_marker2 = 2
_player = 3
_marker3 = 4
_marker4 = 5
_setmove = 6

chopper move getPos marker2
@(unitready chopper)

#loop

chopper move getPos marker3
? (playerhasrequestedairlift) : goto "Evac"
@marker3 distance chopper < 90

chopper move getPos marker4
? (playerhasrequestedairlift) : goto "Evac"
@marker4 distance chopper < 90

chopper move getPos paradrop
? (playerhasrequestedairlift) : goto "Evac"
@paradrop distance chopper < 90

chopper move getPos marker2
? (playerhasrequestedairlift) : goto "Evac"
@marker2 distance chopper < 90

goto "loop"

#Evac

player sideChat "HOTEL ONE, DOURDAN IS CLEAR. REQUESTING AIRLIFT, OVER."
~3

chopper sideChat "ROGER THAT ALPHA. HOTEL INBOUND. ETA 10 SECONDS"
~3

chopper move getPos setmove
@setmove distance chopper < 90

chopper setSpeedMode "LIMITED"

chopper move getpos player

chopper flyInHeight 20
~15

chopper flyInHeight 15
~6

chopper flyInHeight 10
~4

chopper flyInHeight 5
~6

chopper flyInHeight 0.2

@ (player in chopper)

chopper flyInHeight 20
~3

chopper flyInHeight 40
~3

chopper flyInHeight 45

chopper setSpeedMode "FULL"

chopper move getPos marker

exit

Thnx,

Hauk

BibiPhoque

  • Guest
Re:my heli sentry/airlift script won't work on Malden
« Reply #1 on: 16 May 2004, 15:05:34 »
Is everything exactly the same on desert island and on malden (including script, game logics positions...) ?

Offline Hauk

  • Members
  • *
  • I sail under the Jolly Roger!! Pirates are kings!!
Re:my heli sentry/airlift script won't work on Malden
« Reply #2 on: 16 May 2004, 16:28:41 »
yep, checked and double checked twice :o

BibiPhoque

  • Guest
Re:my heli sentry/airlift script won't work on Malden
« Reply #3 on: 16 May 2004, 17:12:55 »
Try changing @makerX distance chopper < 90 to something like 100 or higher... I don't think it'll work, but try it anyway.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:my heli sentry/airlift script won't work on Malden
« Reply #4 on: 16 May 2004, 20:30:59 »
Works for me just fine...

You need to make sure that you are on a relatively flat, treeless ground (bushes don't matter so much) when the chopper starts to get close on you (when it get's your coords)...

I also took a liberty of modifying your code to work a bit faster and so on...

Code: [Select]
_chopper = _this select 0

_chopper move getPos marker2
@unitready _chopper

#loop

_chopper move getPos marker3
? (playerhasrequestedairlift) : goto "Evac"
@marker3 distance _chopper < 90


_chopper move getPos marker4
? (playerhasrequestedairlift) : goto "Evac"
@marker4 distance _chopper < 90

_chopper move getPos paradrop
? (playerhasrequestedairlift) : goto "Evac"
@paradrop distance _chopper < 90

_chopper move getPos marker2
? (playerhasrequestedairlift) : goto "Evac"
@marker2 distance _chopper < 90

goto "loop"

#Evac

player sideChat "HOTEL ONE, DOURDAN IS CLEAR. REQUESTING AIRLIFT, OVER."
~3

_chopper sideChat "ROGER THAT ALPHA. HOTEL INBOUND. ETA 10 SECONDS"
~3

_chopper move getPos setmove
@setmove distance _chopper < 90

_chopper setSpeedMode "LIMITED"

_chopper move getpos player

@unitready _chopper
_chopper land "GET IN"

@player in _chopper

_chopper setSpeedMode "FULL"

_chopper move getPos marker

exit

There's no need to use the helicopters name chopper as you execute the script by passing the chopper (global variable) in it as _chopper (local variable).
The _chopper land "GET IN" makes the same as you did by flyInHeights, but works more smoothly and faster... (you don't wanna hang around too long in hostile areas  ;) )

No guarantees on any syntaxes, I easily make mistakes  ;D :P
« Last Edit: 16 May 2004, 20:31:48 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Hauk

  • Members
  • *
  • I sail under the Jolly Roger!! Pirates are kings!!
Re:my heli sentry/airlift script won't work on Malden
« Reply #5 on: 16 May 2004, 21:33:25 »
That's weird. I'm standing just off the road from dourdan that goes into the  mountains (goes off the main road) and the setmove is among trees if that makes any differance. But I'm in open ground and there are no  obstacles.
 ???

I'll give the modification a shot. ;D

Thnx,

Hauk