Player::taskHeliMission: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{ClientsideJsFunction}}
{{ClientsideJsFunction}}


Line 4: Line 6:


{{JSContainer|
{{JSContainer|
==Syntax==
<pre>player.taskHeliMission(vehicle, p2, pedToFollow, posX, posY, posZ, mode, speed, radius, angle, p11, height, p13, landingFlag);</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)


== Mission Types ==
<pre>
* MISSION_NONE = 0,              // 0
* MISSION_CRUISE,                // 1
* MISSION_RAM,                    // 2
* MISSION_BLOCK,                  // 3
* MISSION_GOTO,                  // 4
* MISSION_STOP,                  // 5
* MISSION_ATTACK,                // 6
* MISSION_FOLLOW,                // 7
* MISSION_FLEE,                  // 8
* MISSION_CIRCLE,                // 9
* MISSION_ESCORT_LEFT,            // 10
* MISSION_ESCORT_RIGHT,          // 11
* MISSION_ESCORT_REAR,            // 12
* MISSION_ESCORT_FRONT,          // 13
* MISSION_GOTO_RACING,            // 14
* MISSION_FOLLOW_RECORDING,      // 15
* MISSION_POLICE_BEHAVIOUR,      // 16
* MISSION_PARK_PERPENDICULAR,    // 17
* MISSION_PARK_PARALLEL,          // 18
* MISSION_LAND,                  // 19
* MISSION_LAND_AND_WAIT,          // 20
* MISSION_CRASH,                  // 21
* MISSION_PULL_OVER,              // 22
* MISSION_PROTECT // 23
</pre>
== Flags ==
<pre>
NONE = 0
AttainRequestedOrientation = 1
DontModifyOrientation = 2
DontModifyPitch = 4
DontModifyThrottle = 8
DontModifyRoll = 16
LandOnArrival = 32
DontDoAvoidance = 64
StartEngineImmediately = 128
ForceHeightMapAvoidance = 256
HEIGHTMAPONLYAVOIDANCE = 320
DontClampProbesToDestination = 512
EnableTimeslicingWhenPossible = 1024
CircleOppositeDirection = 2048
MaintainHeightAboveTerrain = 4096
IgnoreHiddenEntitiesDuringLand = 8192
DisableAllHeightMapAvoidance = 16384
</pre>
=== Required Arguments ===
=== Required Arguments ===
*'''vehicle:''' Vehicle handle or object
*'''vehicle:''' Vehicle handle
*'''p2:''' unk
*'''pedToFollow:''' Ped handle to follow
*'''pedToFollow:''' Ped handle or object
*'''posX:''' {{RageType|float}}
*'''posX:''' {{RageType|float}}
*'''posY:''' {{RageType|float}}
*'''posY:''' {{RageType|float}}
*'''posZ:''' {{RageType|float}}
*'''posZ:''' {{RageType|float}}
*'''mode:''' {{RageType|int}}
*'''mission:''' {{RageType|int}}
*'''speed:''' {{RageType|float}}
*'''cruisespeed:''' {{RageType|float}}
*'''radius:''' {{RageType|float}}
*'''radius:''' {{RageType|float}}
*'''angle:''' {{RageType|float}}
*'''heliOrientation:''' {{RageType|float}}
*'''p11:''' {{RageType|int}}
*'''flightHeight:''' {{RageType|int}}
*'''height:''' {{RageType|int}}
*'''minHeightAboveGround:''' {{RageType|int}}
*'''p13:''' {{RageType|float}}
*'''slowDownDistance:''' {{RageType|float}}
*'''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)
*'''flag:''' {{RageType|int}}


===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
== Syntax ==
<pre>
entity.taskHeliMission(vehicle, targetPed, posX, posY, posZ, mission, cruisespeed, radius, heliOrientation, flightHeight, minHeightAboveGround, slowDownDistance, flag);
</pre>


==Example==
==Example==
<pre>
<pre>
// todo
// Makes the helicopter pilot land on destination (X: 2113.1481, Y: 4799.7558, Z: 41.1516)
heliPed.taskHeliMission(heli.handle, 0, 0, 2113.1481, 4799.7558, 41.1516, 20, 1.0, 5, -1.0, 10, 0, 5.0, 32);
</pre>
</pre>
}}
}}


Line 43: Line 90:
{{Player_function_c}}
{{Player_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]

Latest revision as of 18:47, 4 March 2024


Client-Side
Function

 JavaScript




JavaScript Syntax


Mission Types

* MISSION_NONE = 0,               // 0
* MISSION_CRUISE,                 // 1
* MISSION_RAM,                    // 2
* MISSION_BLOCK,                  // 3
* MISSION_GOTO,                   // 4
* MISSION_STOP,                   // 5
* MISSION_ATTACK,                 // 6
* MISSION_FOLLOW,                 // 7
* MISSION_FLEE,                   // 8
* MISSION_CIRCLE,                 // 9
* MISSION_ESCORT_LEFT,            // 10
* MISSION_ESCORT_RIGHT,           // 11
* MISSION_ESCORT_REAR,            // 12
* MISSION_ESCORT_FRONT,           // 13
* MISSION_GOTO_RACING,            // 14
* MISSION_FOLLOW_RECORDING,       // 15
* MISSION_POLICE_BEHAVIOUR,       // 16
* MISSION_PARK_PERPENDICULAR,     // 17
* MISSION_PARK_PARALLEL,          // 18
* MISSION_LAND,                   // 19
* MISSION_LAND_AND_WAIT,          // 20
* MISSION_CRASH,                  // 21
* MISSION_PULL_OVER,               // 22
* MISSION_PROTECT					// 23

Flags

NONE = 0
AttainRequestedOrientation = 1
DontModifyOrientation = 2
DontModifyPitch = 4
DontModifyThrottle = 8
DontModifyRoll = 16
LandOnArrival = 32
DontDoAvoidance = 64
StartEngineImmediately = 128
ForceHeightMapAvoidance = 256
HEIGHTMAPONLYAVOIDANCE = 320
DontClampProbesToDestination = 512
EnableTimeslicingWhenPossible = 1024
CircleOppositeDirection = 2048
MaintainHeightAboveTerrain = 4096
IgnoreHiddenEntitiesDuringLand = 8192
DisableAllHeightMapAvoidance = 16384

Required Arguments

  • vehicle: Vehicle handle
  • pedToFollow: Ped handle to follow
  • posX: float
  • posY: float
  • posZ: float
  • mission: int
  • cruisespeed: float
  • radius: float
  • heliOrientation: float
  • flightHeight: int
  • minHeightAboveGround: int
  • slowDownDistance: float
  • flag: int

Return value

  • Undefined

Syntax

entity.taskHeliMission(vehicle, targetPed, posX, posY, posZ, mission, cruisespeed, radius, heliOrientation, flightHeight, minHeightAboveGround, slowDownDistance, flag);

Example

// Makes the helicopter pilot land on destination (X: 2113.1481, Y: 4799.7558, Z: 41.1516)
heliPed.taskHeliMission(heli.handle, 0, 0, 2113.1481, 4799.7558, 41.1516, 20, 1.0, 5, -1.0, 10, 0, 5.0, 32);



See also