Home   Help Search Login Register  

Author Topic: Helicopter Script by Skumball ( help needed )  (Read 796 times)

0 Members and 1 Guest are viewing this topic.

Neal

  • Guest
Helicopter Script by Skumball ( help needed )
« on: 03 Dec 2003, 00:00:59 »
This is the script will you go 0 (radio) 0 again for helicopter and then 1 for it to move and then you click on the map. Well I am wondering if it is possible to have it move more than 1 helicopter. Like 2 or 3.

I have changed some of the files. It use to be blackhawk where it says Huey but I changed it to huey since I am using this for the sebnam

Here are the file info from the script:

Cords.sqs

;improved and much more smaller position-script by Softegg, softegg.ofp@gmx.de
;inspired by Fishion, Jerommeke and toadlife
;modified by Skumball for Heli Transport (map click)

_pos = _this select 0

_xpos = _pos select 0
_ypos = _pos select 1

_letters =

["Aa","Ab","Ac","Ad","Ae","Af","Ag","Ah","Ai","Aj","Ba","Bb","Bc","Bd","Be","Bf","Bg","Bh","Bi","Bj","Ca"

,"Cb","Cc","Cd","Ce","Cf","Cg","Ch","Ci","Cj","Da","Db","Dc","Dd","De","Df","Dg","Dh","Di","Dj","Ea","Eb"

,"Ec","Ed","Ee","Ef","Eg","Eh","Ei","Ej","Fa","Fb","Fc","Fd","Fe","Ff","Fg","Fh","Fi","Fj","Ga","Gb","Gc"

,"Gd","Ge","Gf","Gg","Gh","Gi","Gj","Ha","Hb","Hc","Hd","He","Hf","Hg","Hh","Hi","Hj","Ia","Ib","Ic","Id"

,"Ie","If","Ig","Ih","Ii","Ij","Ja","Jb","Jc","Jd","Je","Jf","Jg","Jh","Ji","Jj"]
_numbers =

["99","98","97","96","95","94","93","92","91","90","89","88","87","86","85","84","83","82","81","80","79"

,"78","77","76","75","74","73","72","71","70","69","68","67","66","65","64","63","62","61","60","59","58"

,"57","56","55","54","53","52","51","50","49","48","47","46","45","44","43","42","41","40","39","38","37"

,"36","35","34","33","32","31","30","29","28","27","26","25","24","23","22","21","20","19","18","17","16"

,"15","14","13","12","11","10","09","08","07","06","05","04","03","02","01","00"]

? (_xpos < 0) or (_xpos > 12800) : _xcoor = "??"; goto "Ycoor"

_xcoor = _letters select ((_xpos-64)/128)

#Ycoor

? (_ypos < 0) or (_ypos > 12800) : _ycoor = "??"; goto "ShowXYcoor"

_ycoor = _numbers select ((_ypos-64)/128)

#ShowXYcoor

heliPilot sideChat format ["Moving to grid reference %1%2", _xcoor, _ycoor]

exit




Helibase.sqs


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

onMapSingleClick {}
2 setRadioMsg "null"

"Huey" setMarkerType "empty"

heliPilot sideChat "Heading back"
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"

exit

helimove.sqs


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

_pos = _this select 0

onMapSingleClick {}
2 setRadioMsg "Huey back to base"

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

[_pos] exec "coords.sqs"
heliPilot doMove _pos
@ (unitReady heliPilot) && ((getPos heli select 2) > 10)
~2
heli land "get in"
@ (unitReady heliPilot) && ((getPos heli select 2) < 1)
heliPilot sideChat "Ready"

exit

init.sqs

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



2 setRadioMsg "null"

heliPilot setBehaviour "careless"
heliPilot setCombatMode "blue"
heliPilot assignAsDriver heli
heliPilot moveInDriver heli

#loop
? !(alive heliPilot) : goto "dead"
~2
goto "loop"

#dead
onMapSingleClick {}
1 setRadioMsg "null"
2 setRadioMsg "null"
"Huey" setMarkerType "empty"

exit