Object::slide: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Returns true if the object has finished moving.<br><br>If false, moves the object towards the specified X, Y and Z coordinates with the specified X, Y and Z speed.<br><br>See also: gtag.gtagaming.com/opcode-database/opcode/034E/<br><br>-- also see (fivem.net/)
Returns true if the object has finished moving. If false, moves the object towards the specified X, Y and Z coordinates with the specified X, Y and Z speed.<br>See also: gtag.gtagaming.com/opcode-database/opcode/034E/<br>'''Has to be called in a render or it will not slide but move some amount and stop.'''
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">object.slide(toX, toY, toZ, speedX, speedY, speedZ, collision);</syntaxhighlight>
<syntaxhighlight lang="javascript">object.slide(toX, toY, toZ, speedX, speedY, speedZ, collision);</syntaxhighlight>
Line 14: Line 14:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
mp.events.add('render', () => {
  object.slide(position.x, position.y, position.z, 1.0, 1.0, 1.0, false);
});
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==

Latest revision as of 22:48, 21 December 2018

Returns true if the object has finished moving. If false, moves the object towards the specified X, Y and Z coordinates with the specified X, Y and Z speed.
See also: gtag.gtagaming.com/opcode-database/opcode/034E/
Has to be called in a render or it will not slide but move some amount and stop.

Syntax

object.slide(toX, toY, toZ, speedX, speedY, speedZ, collision);

Required Arguments

  • toX: float
  • toY: float
  • toZ: float
  • speedX: float
  • speedY: float
  • speedZ: float
  • collision: Boolean

Return value

  • Boolean

Example

mp.events.add('render', () => {
  object.slide(position.x, position.y, position.z, 1.0, 1.0, 1.0, false);
});

See also

  • [[Object::disableGlow|mp.game.object.disableGlow