SetObjectStatic: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: __NOTOC__ {{Client function}} Makes an object static or non-static. Static objects are rock solid in one place, unaffected by gravity and pushing. Nonstatic objects can fall, be pushed ar...)
 
m (Description note about dynamic objects, I don't think there is any other way to deal with them.)
Line 4: Line 4:
Makes an object static or non-static. Static objects are rock solid in one place, unaffected by gravity and pushing. Nonstatic objects can fall, be pushed around etc.
Makes an object static or non-static. Static objects are rock solid in one place, unaffected by gravity and pushing. Nonstatic objects can fall, be pushed around etc.


Note that not all objects that are static by default can be made nonstatic.
'''Note1:''' that not all objects that are static by default can be made nonstatic.<br\>
'''Note2:''' Dynamic objects with a "destroyed" state are still destroyable. Use [[isElementOnScreen]] to detect, destroy, and recreate these objects.


==Syntax==
==Syntax==

Revision as of 06:50, 3 February 2011

Makes an object static or non-static. Static objects are rock solid in one place, unaffected by gravity and pushing. Nonstatic objects can fall, be pushed around etc.

Note1: that not all objects that are static by default can be made nonstatic.<br\> Note2: Dynamic objects with a "destroyed" state are still destroyable. Use isElementOnScreen to detect, destroy, and recreate these objects.

Syntax

bool setObjectStatic ( object theObject, bool toggle )

Required Arguments

  • theObject: the object whose behaviour you want to change.
  • toggle: true makes the object static, false makes it nonstatic.

Returns

Returns true if successful, false otherwise.

Example

See Also