Player::taskStartScenarioAtPosition: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
mNo edit summary
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
List of scenarioNames: pastebin.com/6mrYTdQv<br><br>Also a few more listed at Player::TASK_START_SCENARIO_IN_PLACE just above.<br>---------------<br>The first parameter in every scenario has always been a Ped of some sort. The second like TASK_START_SCENARIO_IN_PLACE is the name of the scenario. <br><br>The next 4 parameters were harder to decipher. After viewing 'hairdo_shop_mp.ysc.c4', and being confused from seeing the case in other scripts, they passed the first three of the arguments as one array from a function, and it looked like it was obviously x, y, and z.<br><br>I haven't seen the sixth parameter go to or over 360, making me believe that it is rotation, but I really can't confirm anything.<br><br>I have no idea what the last 3 parameters are, but I'll try to find out.<br><br>-going on the last 3 parameters, they appear to always be '0, 0, 1'<br><br>p6 -1 also used in scrips<br><br>p7 used for sitting scenarios<br><br>p8 teleports ped to position
[[Scenarios|Scenario List]]<br>---------------<br>-going on the last 3 parameters, they appear to always be '0, 0, 1'<br><br>duration -1 also used in scripts<br><br>sittingScenario parameter is used for sitting scenarios<br><br>teleport parameter teleports ped to the given position
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">player.taskStartScenarioAtPosition(scenarioName, x, y, z, heading, p6, p7, p8);</syntaxhighlight>
<pre>player.taskStartScenarioAtPosition(scenarioName, x, y, z, heading, duration, sittingScenario, teleport);</pre>
=== Required Arguments ===
=== Required Arguments ===
*'''scenarioName:''' String
*'''scenarioName:''' String
Line 8: Line 8:
*'''z:''' float
*'''z:''' float
*'''heading:''' float
*'''heading:''' float
*'''p6:''' unknown (to be checked)
*'''duration:''' Int
*'''p7:''' Boolean
*'''sittingScenario:''' Boolean
*'''p8:''' Boolean
*'''teleport:''' Boolean
===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]]

Latest revision as of 20:24, 16 November 2021

Scenario List
---------------
-going on the last 3 parameters, they appear to always be '0, 0, 1'

duration -1 also used in scripts

sittingScenario parameter is used for sitting scenarios

teleport parameter teleports ped to the given position

Syntax

player.taskStartScenarioAtPosition(scenarioName, x, y, z, heading, duration, sittingScenario, teleport);

Required Arguments

  • scenarioName: String
  • x: float
  • y: float
  • z: float
  • heading: float
  • duration: Int
  • sittingScenario: Boolean
  • teleport: Boolean

Return value

  • Undefined

Example

// todo

See also