Home   Help Search Login Register  

Author Topic: My dynamic chopper evac, plz help  (Read 1029 times)

0 Members and 1 Guest are viewing this topic.

mcnils

  • Guest
My dynamic chopper evac, plz help
« on: 24 Jun 2003, 00:33:48 »
"takeoff.sqs"

Code: [Select]
? p1 distance baselz > 1000 : goto "exit1"
goto "go1"

#go1
lz setpos [getpos p1 select 0, getpos p1 select 1, (getpos p1 select 2) + 0]
helo1 sidechat "Roger, UH60 evac on the way, hang in there."
helo1 setfuel 1
helo1 flyinheight 100
helo1 domove getpos lz
helo1 setspeedmode "FULL"
goto "smokedtct"

#smokedtct
? helo1 distance lz < 600 : goto "smoke1"
~0.5
goto "smokedtct"

#smoke1
Smoker1 = "SmokeShell" camcreate [getpos lz select 0, getpos lz select 1, (getpos lz select 2) + 4]
goto "loop"

#loop
? helo1 distance lz < 300 : goto "land"
~0.5
goto "loop"

#land
helo1 setspeedmode "LIMITED"
helo1 land "land"
_height = getpos helo1 select 2
? _height < 1 : goto "end"
~0.5
goto "land"


#end
helo1 flyinheight 0
helo1 sidechat "UH60 ready for evac, jump in!"

exit

#exit1
helo1 sidechat "Negative, you are 1km close to the base, you can walk.."

exit


This is a dynamic helo extraction script witch I modified for my needs.


"P1" is the player.
"lz" is an invisible H.
"baselz" is an H located at the base.
"UH60" is the chopper.


Now, what happens (or atlast is supposed to)??

1- "P1" calls "takeoff.sqs" via radio.

2- "takeoff.sqs" checks if "P1" is nearer than 1km to baselz,
if he is to near the negative message appears and the script exits.

3- If "P1" is farther away than 1km the script proceeds and the invisible H called "lz" moves to "P1"s position,
serving as landing objective for "UH60".

4- Once "UH60" is 600 meters away from "P1",
a smoke pops up on the landing spot ("lz").

5- "UH60" lands and "P1" boards the chopper,
once "P1" is ready for evacuation he can call in the "returntobase.sqs".


All this just to make you understand what my script should do.
Now what's the problem?
Problem is that the chopper ("UH60") takes off also if "P1" is lesser than 1km away from the base ("baselz")..
distance check doesnt work, dont know why... I'm no scripting ace.. thats why I ask here, plz help :-\
« Last Edit: 24 Jun 2003, 01:01:27 by mcnils »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:My dynamic chopper evac, plz help
« Reply #1 on: 24 Jun 2003, 01:16:07 »
u mixed da signs - i bet dat it doesnt work wen u r far away - u told him 2 go to exit1 if he is faarer dan 1000 :P

da startin line shud b

? p1 distance baselz < 1000 : goto "exit1"

:P :P :P

 :-*
 ;D
:cheers:

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

mcnils

  • Guest
Re:My dynamic chopper evac, plz help
« Reply #2 on: 24 Jun 2003, 01:19:15 »

LoooooooooooooooooooooL  ;D ;D ;D ;D

I suxx at maths :D


thx for answer lolol
..that comes when u just cut and paste things from others,
modify them a bit and hope it will work lol

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:My dynamic chopper evac, plz help
« Reply #3 on: 24 Jun 2003, 01:20:46 »
not maths prob :P - payin attention ;)  ;D

if prob is solved - solve da topic

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

mcnils

  • Guest
Re:My dynamic chopper evac, plz help
« Reply #4 on: 24 Jun 2003, 01:24:51 »

> major
< minor

(or sumthing like that)

thats math :P
and I sux at that, so thats why I didnt notice, hihihi ^___^