SetTrainPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(add settrainpos)
 
m (fix typo)
Line 6: Line 6:


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">bool setTrainPosition ( vehicle train, float position )code>
<syntaxhighlight lang="lua">bool setTrainPosition ( vehicle train, float position )</syntaxhighlight>
{{OOP||[[vehicle]]:setTrainPosition|trainPosition|getTrainPosition}}
{{OOP||[[vehicle]]:setTrainPosition|trainPosition|getTrainPosition}}
===Required Arguments===
===Required Arguments===

Revision as of 01:23, 13 September 2015

Sets the position the train is currently on the track

Syntax

bool setTrainPosition ( vehicle train, float position )

OOP Syntax Help! I don't understand this!

Method: vehicle:setTrainPosition(...)
Variable: .trainPosition
Counterpart: getTrainPosition


Required Arguments

  • train: the train of which to set the track
  • position: the position along the track

Returns

Returns true if the train position was set, false otherwise.

Example

Accessories-text-editor.png Script Example Missing Function SetTrainPosition needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.
-- TODO


See Also