TaskPlaneMission AI Waypoint Mission for the Blimp

Heyo

im trying to create a blimp (Atomic Blimp Atomic Blimp | GTA Wiki | Fandom) that flies Waypoint missions.
Ive found a couple of natives that allow me to do waypoint missions with airplanes like the hydra. But i cannot get it to work with the blimp.

What i currently have:
Spawning the blimp and creating a ped inside of it:

	modelHash = GetHashKey(Config.VehicleModel)
	pedHash = GetHashKey(Config.PedType)
	
	RequestModel(modelHash)
	RequestModel(pedHash)
    while not HasModelLoaded(modelHash) or not HasModelLoaded(pedHash) do Wait(1) end
	
	veh = CreateVehicle(modelHash, wps[1].x, wps[1].y, wps[1].z, wps[1].w, false, false)
	while not DoesEntityExist(veh) do Wait(1) end
	SetVehicleOnGroundProperly(veh)
	SetVehicleEngineOn(veh, true, true, true)
	SetEntityProofs(veh, true, true, true, true, true, true, true, false)
	SetVehicleHasBeenOwnedByPlayer(veh, true)
	
	ped = CreatePedInsideVehicle(veh, 6, pedHash, -1, true, false)
	while not DoesEntityExist(ped) do Wait(1) end
	SetBlockingOfNonTemporaryEvents(ped, true)

And then i wait 8 seconds just to be 100% sure everything loaded… after that create the task:

	Wait(8000)
	TaskPlaneMission(ped, veh, 0, 0, wps[2].x, wps[2].y, wps[2].z, 4, 100.0, 100.0, wps[2].w, 2000.0, 400.0); 

Like i said this works fine with the Hydra for example but the Blimp will just hover or stay on the ground (depending on the initial coords).
Has anyone had this problem before and can help me?

Ive even checked the class of the blimp (GetVehicleClass) just to be sure its a plane (if it would be a type heli id have to use TaskHeliMission) but it returned 16 → Plane… Im lost here please help!

*Bump

Did nobody ever deal with this? :smiley:
Is it maybe a bug ?

@marviniwurscht

Just for testing purposes, try the following

TaskPlaneMission(ped, veh, 0, 0, wps[2].x, wps[2].y, wps[2].z, 8, 100.0, 0, wps[2].w, 2500.0, 1500.0); 
1 Like

Heyo sorry for my late reply!

i tried the code you provided but it didnt change anything. The blimp is still standing / hovering at the spawnpoint.

1 Like

‘class’ has nothing to do with behavior and is only there for visual display (bottom right of HUD, vehicle mod shop, etc.). Blimps are helis, not planes.

1 Like

Hey @d-bubble ,

thanks for the Info, didnt know that! :slight_smile:
Is there any way to get the actual “type” of the vehicle, not just the class?

Ok so a blimp is classified as a heli, that means “TaskHeliMission” should be the right Native for moving a Blimp.
Im currently using the native like this, without any luck
TaskHeliMission(ped, veh, 0, 0, wps[2].x, wps[2].y, wps[2].z, 4, 500.0, -1.0, -1.0, 10, 10, 5.0, 0)
This again works perfectly fine with other Helis (e.g. the hunter) but not with a blimp :frowning:

vehicles.meta should show this, I’m not sure if this is specified via script anywhere other than the IS_THIS_MODEL_A _* calls.

Blimps technically are blimps which are a subclass of heli, it could be the heli tasks are lacking a check. I’ll set a reminder to investigate this later if I manage to have time for such.

1 Like

Alright thanks a lot !

Mind releasing the working version?