[HELP] Make Birds Fly

Anyone knows how to make bird peds fly? Have tried SetGlobalMinBirdFlightHeight and TaskSmartFleePed with no results other than the bird fleeing on foot.

do you have any updates on how to spawn them in the air or make them fly?

Unfortunately I only found a semi-workaround, that makes birds fly away when a player is nearby.
To do this you need following done to the entity.

-- Make sure to set group relationships
SetRelationshipBetweenGroups(5, GetHashKey("WILD_ANIMAL"), GetHashKey("PLAYER"))
SetRelationshipBetweenGroups(5, GetHashKey("PLAYER"), GetHashKey("WILD_ANIMAL"))

-- Assign the according relationship to the bird/entity
SetPedRelationshipGroupHash(bird, GetHashKey("WILD_ANIMAL"))

I could imagine that you could make them flee/fly instantly using AddShockingEventForEntity and TaskShockingEventReact. Although I have not tested that.

i already tried shocking events and the birds seem to be immune, i tried a for loop up 1000 with a wait of 100 and none of the thousand scared them, but the nearby ped’s got scared

Yeah that’s weird. Animal AI in general is only poorly supported by known natives.
But you might consider looking into the TaskTypeIndex since there is at least CTaskFlyingWander mentioned.

If you figure out how to play them indices let me know :wink: