OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Marines850 on 18 May 2004, 23:37:53
-
Anyone ever made a script where when you call in for ammo support a helicopter comes and parachutes an ammo crate to the Designated LZ?
-
Dude that would be sweet, Does anyone also have a script for a medivac when called through the same menu (MEDIC)?
-
you could probably make one for medevac, just make the chopper fly to the marker that's setpos to you.
I think the ammo crate thing was in a mission I played. Can't remeber which one but it can be done. :P
-
There was some script for dropping tanks same way in editors depot, I think thats one of the tutorials, written by David Berka. But the idea is
; script by David Berka (David.Berka@nmi.at), modified by -=Ronin=- Uldics
_heli = _this select 0
_tankuliste = tankulisteW
_palikusietanki = count _tankuliste
heloreadyW=false
#Saakums
@ not heloreadyW
_car = _tankuliste select (_palikusietanki-1)
#Update
_heliPos = getPos _heli
_heliPosX = _heliPos select 0
_heliPosY = _heliPos select 1
_heliPosZ = _heliPos select 2
_car setPos [_heliPosX, _heliPosY, _heliPosZ - 5]
_heading = getDir _heli
_car setDir _heading
~0.01
? (not heloreadyW) : goto "Update"
_chute = "Parachute" createvehicle [0,0,300]
#Drop
_chute setDir _heading
~0.01
_carPos = getPos _car
_carPosX = _carPos select 0
_carPosY = _carPos select 1
_carPosZ = _carPos select 2
_chute setPos [_carPosX, _carPosY, _heliPosZ - 18]
#DropUpdate
_chutePos = getPos _chute
_chutePosX = _chutePos select 0
_chutePosY = _chutePos select 1
_chutePosZ = _chutePos select 2
_car setPos [_chutePosX, _chutePosY, _chutePosZ - 3]
~0.01
? (_chutePosZ > 3) : goto "DropUpdate"
_palikusietanki=_palikusietanki-1
? (_palikusietanki>0) : goto "Saakums"
I have modified it to suit my needs of dropping few tanks, one at every arrival.
heloreadyW is used to get to know, when the helo is at which waypoint (addtank or droptank).
@ not heloreadyW is used to wait for helo to arrive at one of the waypoints.
-
I think the Support Pack also has this option.