Object::slide: Difference between revisions

From RAGE Multiplayer Wiki
(has to be in render)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
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 up and stop.***
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>

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