Player::taskHeliMission: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
Line 1: Line 1:
Needs more research.<br><br>Default value of p13 is -1.0 or 0xBF800000.<br>Default value of p14 is 0.<br><br>Modified examples from 'fm_mission_controller.ysc', line ~203551:<br>Player::TASK_HELI_MISSION(ped, vehicle, 0, 0, posX, posY, posZ, 4, 1.0, -1.0, -1.0, 10, 10, 5.0, 0);<br>Player::TASK_HELI_MISSION(ped, vehicle, 0, 0, posX, posY, posZ, 4, 1.0, -1.0, -1.0, 0, ?, 5.0, 4096);<br><br>int mode seams to set mission type 4 = coords target, 23 = ped target.<br>int 14 set to 32 = ped will land at destination.<br><br>My findings:<br>mode 4 or 7 forces heli to snap to the heading set<br>8 makes the heli flee from the player.<br>9 circles around ped with angle set<br>10, 11 normal + imitate ped heading<br>20 makes the heli land when he's near the player. It won't resume chasing.<br>21 emulates an helicopter crash<br>23 makes the heli circle erratically around ped<br><br>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.
{{ClientsideJsFunction}}
 
__NOTOC__
 
{{JSContainer|
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">player.taskHeliMission(vehicle, p2, pedToFollow, posX, posY, posZ, mode, speed, radius, angle, p11, height, p13, p14);</syntaxhighlight>
<pre>player.taskHeliMission(vehicle, p2, pedToFollow, posX, posY, posZ, mode, speed, radius, angle, p11, height, p13, p14);</pre>
 
== Modes ==
*'''4''' (Heads to the destination)
*'''8''' (Flee from player)
*'''9''' (Circle around the destination)
*'''10''' (Take same target's heading)
*'''20''' (Lands the heli. on the destination)
*'''21''' (Crash on the destination)
 
=== Required Arguments ===
=== Required Arguments ===
*'''vehicle:''' Vehicle handle or object
*'''vehicle:''' Vehicle handle or object
*'''p2:''' unknown (to be checked)
*'''p2:''' unk
*'''pedToFollow:''' Ped handle or object
*'''pedToFollow:''' Ped handle or object
*'''posX:''' float
*'''posX:''' {{RageType|float}}
*'''posY:''' float
*'''posY:''' {{RageType|float}}
*'''posZ:''' float
*'''posZ:''' {{RageType|float}}
*'''mode:''' int
*'''mode:''' {{RageType|int}}
*'''speed:''' float
*'''speed:''' {{RageType|float}}
*'''radius:''' float
*'''radius:''' {{RageType|float}}
*'''angle:''' float
*'''angle:''' {{RageType|float}}
*'''p11:''' int
*'''p11:''' {{RageType|int}}
*'''height:''' int
*'''height:''' {{RageType|int}}
*'''p13:''' float
*'''p13:''' {{RageType|float}}
*'''p14:''' int
*'''landingFlag:''' {{RageType|int}} ('''Flags''': <code>0</code> Hover over destination, <code>32</code> Land on destination, <code>1024</code> Crash into destination, <code>4096</code> Rush and Hover to destination)
 
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<pre>
// todo
// todo
</syntaxhighlight>
</pre>
}}
 
==See also==
==See also==
{{Player_function_c}}
{{Player_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Revision as of 16:12, 23 May 2020

Client-Side
Function

 JavaScript




JavaScript Syntax

Syntax

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

Modes

  • 4 (Heads to the destination)
  • 8 (Flee from player)
  • 9 (Circle around the destination)
  • 10 (Take same target's heading)
  • 20 (Lands the heli. on the destination)
  • 21 (Crash on the destination)

Required Arguments

  • vehicle: Vehicle handle or object
  • p2: unk
  • 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
  • landingFlag: int (Flags: 0 Hover over destination, 32 Land on destination, 1024 Crash into destination, 4096 Rush and Hover to destination)

Return value

  • Undefined

Example

// todo


See also