SpawnVehicleFlyingComponent

From Multi Theft Auto: Wiki
Revision as of 19:38, 12 October 2024 by FileEX (talk | contribs)
Jump to navigation Jump to search

ADDED/UPDATED IN VERSION 1.6.0 r22771:
This function creates a dynamic (motion-dependent) falling vehicle component.
[[{{{image}}}|link=|]] Note: The maximum number of components that can be created simultaneously is 150. Beyond this limit, no new components will be created until an existing component is removed and the count drops below 150.

Syntax

bool spawnVehicleFlyingComponent(vehicle theVehicle, number nodeIndex [, number collisionType, number removalTime ] )

OOP Syntax Help! I don't understand this!

Method: element:spawnFlyingComponent(...)


Required Arguments

  • theVehicle: The vehicle whose component is to be created.
  • nodeIndex: Specifies the component to be created (ranging from 1 to 24). Depending on the vehicle, these can be different components such as wheels, fenders, bicycle handlebars, helicopter propellers, train carriages, and many more. Check Vehicle Components.
  • collisionType: Specifies the type of collision for the component, by default it is selected based on the nodeIndex.
    • 0: COL_BUMPER
    • 1: COL_WHEEL
    • 2: COL_DOOR
    • 3: COL_BONNET
    • 4: COL_BOOT
    • 5: COL_PANEL
  • removalTime: The time in milliseconds after which the created component will be removed (it must be removed as it is a temporary object). If not specified, the default time depends on the number of created components.

Returns

Returns true if the component was created, false otherwise.

Example

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

Before submitting check out Editing Guidelines Script Examples.


See Also