SetObjectStatic: Difference between revisions
Jump to navigation
Jump to search
m (Fixed typo) |
mNo edit summary |
||
Line 5: | Line 5: | ||
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. | ||
'''Note1:''' Not all objects that are static by default can be made nonstatic. | '''Note1:''' Not all objects that are static by default can be made nonstatic. | ||
'''Note2:''' Dynamic objects with a "destroyed" state are still destroyable. Use [[isElementOnScreen]] to detect, destroy, and recreate these objects. | '''Note2:''' Dynamic objects with a "destroyed" state are still destroyable. Use [[isElementOnScreen]] to detect, destroy, and recreate these objects. | ||
Latest revision as of 19:36, 17 September 2016
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. | |
Please use setElementFrozen instead. |
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: Not all objects that are static by default can be made nonstatic.
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
- createObject
- getObjectScale
- moveObject
- setObjectScale
- stopObject
- getObjectMass
- getObjectProperty
- setObjectMass
- setObjectProperty