Player::taskHeliMission

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Needs more research.

Default value of p13 is -1.0 or 0xBF800000.
Default value of p14 is 0.

Modified examples from 'fm_mission_controller.ysc', line ~203551:
Player::TASK_HELI_MISSION(ped, vehicle, 0, 0, posX, posY, posZ, 4, 1.0, -1.0, -1.0, 10, 10, 5.0, 0);
Player::TASK_HELI_MISSION(ped, vehicle, 0, 0, posX, posY, posZ, 4, 1.0, -1.0, -1.0, 0, ?, 5.0, 4096);

int mode seams to set mission type 4 = coords target, 23 = ped target.
int 14 set to 32 = ped will land at destination.

My findings:
mode 4 or 7 forces heli to snap to the heading set
8 makes the heli flee from the player.
9 circles around ped with angle set
10, 11 normal + imitate ped heading
20 makes the heli land when he's near the player. It won't resume chasing.
21 emulates an helicopter crash
23 makes the heli circle erratically around ped

I change p2 to 'vehicleToFollow' as it seems to work like the task natives to set targets. In the heli_taxi script where as the merryweather heli takes you to your waypoint it has no need to follow a vehicle or a ped, so of course both have 0 set.

Syntax

player.taskHeliMission(vehicle, p2, pedToFollow, posX, posY, posZ, mode, speed, radius, angle, p11, height, p13, p14);

Required Arguments

  • vehicle: Vehicle handle or object
  • p2: unknown (to be checked)
  • pedToFollow: Ped handle or object
  • posX: float
  • posY: float
  • posZ: float
  • mode: int
  • speed: float
  • radius: float
  • angle: float
  • p11: int
  • height: int
  • p13: float
  • p14: int

Return value

  • Undefined

Example

// todo

See also