Pathfind::generateDirectionsToCoord: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
I'm Not MentaL: <br><br>Example Usage:<br><br>Public Function GenerateDirectionsToCoord(Pos As Vector3) As Tuple(Of String, Single, Single)<br>        Dim f4, f5, f6 As New OutputArgument()<br>        Native.Function.Call(Hash.GENERATE_DIRECTIONS_TO_COORD, Pos.X, Pos.Y, Pos.Z, True, f4, f5, f6)<br>        Dim direction As String = f4.GetResult(Of Single)()<br>        Return New Tuple(Of String, Single, Single)(direction.Substring(0, 1), f5.GetResult(Of Single)(), f6.GetResult(Of Single)())<br>    End Function<br><br>p3 I use 1<br><br>direction:<br>0 = You Have Arrive<br>1 = Recalculating Route, Please make a u-turn where safe<br>2 = Please Proceed the Highlighted Route<br>3 = Keep Left (unsure)<br>4 = In (distToNxJunction) Turn Left<br>5 = In (distToNxJunction) Turn Right<br>6 = Keep Right (unsure)<br>7 = In (distToNxJunction) Go Straight Ahead<br>8 = In (distToNxJunction) Join the freeway<br>9 = In (distToNxJunction) Exit Freeway<br><br>return value set to 0 always==Syntax==<syntaxhighlight lang="javascript">pathfind.generateDirectionsToCoord(x, y, z, p3, p4, vehicle, p6);</syntaxhighlight>=== Required Arguments ===*'''x:''' float*'''y:''' float*'''z:''' float*'''p3:''' unknown (to be checked)*'''p4:''' int*'''vehicle:''' Vehicle*'''p6:''' float===Return value===*'''object:''' p4, vehicle, p6==Example==<syntaxhighlight lang="javascript">todo</syntaxhighlight>==See also=={{Pathfind_function_c}}[[Category:Clientside API]][[Category:TODO: Example]]
I'm Not MentaL: <br><br>Example Usage:<br><br>Public Function GenerateDirectionsToCoord(Pos As Vector3) As Tuple(Of String, Single, Single)<br>        Dim f4, f5, f6 As New OutputArgument()<br>        Native.Function.Call(Hash.GENERATE_DIRECTIONS_TO_COORD, Pos.X, Pos.Y, Pos.Z, True, f4, f5, f6)<br>        Dim direction As String = f4.GetResult(Of Single)()<br>        Return New Tuple(Of String, Single, Single)(direction.Substring(0, 1), f5.GetResult(Of Single)(), f6.GetResult(Of Single)())<br>    End Function<br><br>p3 I use 1<br><br>direction:<br>0 = You Have Arrive<br>1 = Recalculating Route, Please make a u-turn where safe<br>2 = Please Proceed the Highlighted Route<br>3 = Keep Left (unsure)<br>4 = In (distToNxJunction) Turn Left<br>5 = In (distToNxJunction) Turn Right<br>6 = Keep Right (unsure)<br>7 = In (distToNxJunction) Go Straight Ahead<br>8 = In (distToNxJunction) Join the freeway<br>9 = In (distToNxJunction) Exit Freeway<br><br>return value set to 0 always
==Syntax==
<syntaxhighlight lang="javascript">mp.game.pathfind.generateDirectionsToCoord(x, y, z, p3, p4, vehicle, p6);</syntaxhighlight>
=== Required Arguments ===
*'''x:''' float
*'''y:''' float
*'''z:''' float
*'''p3:''' boolean (true)
*'''p4:''' int
*'''vehicle:''' Vehicle
*'''p6:''' float
===Return value===
*'''object:''' p4, vehicle, p6
==Example==
<syntaxhighlight lang="javascript">
// todo
</syntaxhighlight>
==See also==
{{Pathfind_s_function_c}}
[[Category:Clientside API]]
[[Category:TODO: Example]]

Latest revision as of 22:37, 7 February 2019

I'm Not MentaL:

Example Usage:

Public Function GenerateDirectionsToCoord(Pos As Vector3) As Tuple(Of String, Single, Single)
Dim f4, f5, f6 As New OutputArgument()
Native.Function.Call(Hash.GENERATE_DIRECTIONS_TO_COORD, Pos.X, Pos.Y, Pos.Z, True, f4, f5, f6)
Dim direction As String = f4.GetResult(Of Single)()
Return New Tuple(Of String, Single, Single)(direction.Substring(0, 1), f5.GetResult(Of Single)(), f6.GetResult(Of Single)())
End Function

p3 I use 1

direction:
0 = You Have Arrive
1 = Recalculating Route, Please make a u-turn where safe
2 = Please Proceed the Highlighted Route
3 = Keep Left (unsure)
4 = In (distToNxJunction) Turn Left
5 = In (distToNxJunction) Turn Right
6 = Keep Right (unsure)
7 = In (distToNxJunction) Go Straight Ahead
8 = In (distToNxJunction) Join the freeway
9 = In (distToNxJunction) Exit Freeway

return value set to 0 always

Syntax

mp.game.pathfind.generateDirectionsToCoord(x, y, z, p3, p4, vehicle, p6);

Required Arguments

  • x: float
  • y: float
  • z: float
  • p3: boolean (true)
  • p4: int
  • vehicle: Vehicle
  • p6: float

Return value

  • object: p4, vehicle, p6

Example

// todo

See also

Template:Pathfind s function c