Amenmoses the script work very nice. if i use the friendly mode then the helicopter starts up and land were the landing script is, but when i want to use the neutral script it fly's continuously as the script was made for. here is my question if i use the neutral mode how can i tel it to land after lets sy 3min.
planes[e] = {x = Ent.x, y = Ent.y, z = Ent.z,
quat = Q.FromEuler(0, rad(Ang), 0),
currQuat = Q.FromEuler(0, rad(Ang), 0),
state = 'init',
mode = 'friendly',
obj = Ent.obj,
fltTime = math.huge,
retToOrigin = false,
origX = Ent.x, origY = Ent.y, origZ = Ent.z,
timer1 = 0,
timer2 = 0,
targSpeed = 0,
speed = 0, -- units per second
turnSpeed = 0, -- degrees per second
climbSpeed = 0, -- units per second
targAngle = Ang,
currAngle = Ang,
angleLeft = 0, -- radians
targPitch = 0,
currPitch = 0,
targBank = 0,
currBank = 0,
tgtHeight = 1600,
height = 1900, -- units above terrain
targAiEnt = nil, -- only applies in 'friendly' mode
targetX = 0,
targetZ = 0,
targetY = 0,
hasBlade = false,
checkCols = false,
rockets = {},
hadRockets = false,
playerLives = g_PlayerLives,
soundVolume = 90,
animSpeed = 0,
restartSound = false,
soundPlaying = false
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11