LuaDocs/MOSRotating

From Data Realms Wiki

(Difference between revisions)
Jump to: navigation, search
(MOSRotating - Automatically generated by LuaBot)
(MOSRotating - Automatically generated by LuaBot)
 
Line 23: Line 23:
===IsGold===
===IsGold===
Read-only property. Indicates whether this MO is made of Gold or not.Whether this MovableObject is of Gold or not.
Read-only property. Indicates whether this MO is made of Gold or not.Whether this MovableObject is of Gold or not.
 +
 +
===GibWoundLimit===
 +
Return wound limit for this object.Wound limit of the object.
 +
 +
===GibImpulseLimit===
 +
Return impulse limit for this object.Impulse limit of the object.
 +
 +
===WoundCount===
 +
Read-only property. Returns the amount of wound attached to this.Key to retrieve value.Wound amount.
Line 149: Line 158:
None.
None.
 +
 +
 +
===RemoveWounds===
 +
Removes a specified amount of wounds.
 +
 +
'''Arguments:'''
 +
 +
* Amount of wounds to remove.
 +
 +
'''Return value:'''
 +
 +
Amount of damage, caused by these wounds.
Line 173: Line 194:
None.
None.
 +
 +
 +
===GetStringValue===
 +
Returns the string value associated with the specified key or "" if it does not exist.
 +
 +
'''Arguments:'''
 +
 +
* Key to retrieve value.
 +
 +
'''Return value:'''
 +
 +
String value.
 +
 +
 +
===GetNumberValue===
 +
Returns the number value associated with the specified key or 0 if it does not exist.
 +
 +
'''Arguments:'''
 +
 +
* Key to retrieve value.
 +
 +
'''Return value:'''
 +
 +
Number (double) value.
 +
 +
 +
===GetObjectValue===
 +
Returns the object value associated with the specified key or 0 if it does not exist.
 +
 +
'''Arguments:'''
 +
 +
* None.
 +
 +
'''Return value:'''
 +
 +
Object (Entity *) value.
 +
 +
 +
===SetStringValue===
 +
Sets the string value associated with the specified key.
 +
 +
'''Arguments:'''
 +
 +
* String key and value to set.
 +
 +
'''Return value:'''
 +
 +
None.
 +
 +
 +
===SetNumberValue===
 +
Sets the string value associated with the specified key.
 +
 +
'''Arguments:'''
 +
 +
* String key and value to set.
 +
 +
'''Return value:'''
 +
 +
None.
 +
 +
 +
===SetObjectValue===
 +
Sets the string value associated with the specified key.
 +
 +
'''Arguments:'''
 +
 +
* String key and value to set.
 +
 +
'''Return value:'''
 +
 +
None.
 +
 +
 +
===RemoveStringValue===
 +
Remove the string value associated with the specified key.
 +
 +
'''Arguments:'''
 +
 +
* String key to remove.
 +
 +
'''Return value:'''
 +
 +
None.
 +
 +
 +
===RemoveNumberValue===
 +
Remove the number value associated with the specified key.
 +
 +
'''Arguments:'''
 +
 +
* String key to remove.
 +
 +
'''Return value:'''
 +
 +
None.
 +
 +
 +
===RemoveObjectValue===
 +
Remove the object value associated with the specified key.
 +
 +
'''Arguments:'''
 +
 +
* String key to remove.
 +
 +
'''Return value:'''
 +
 +
None.
 +
 +
 +
===StringValueExists===
 +
Checks whether the value associated with the specified key exists.
 +
 +
'''Arguments:'''
 +
 +
* String key to check.
 +
 +
'''Return value:'''
 +
 +
True if value exists.
 +
 +
 +
===NumberValueExists===
 +
Checks whether the value associated with the specified key exists.
 +
 +
'''Arguments:'''
 +
 +
* String key to check.
 +
 +
'''Return value:'''
 +
 +
True if value exists.
 +
 +
 +
===ObjectValueExists===
 +
Checks whether the value associated with the specified key exists.
 +
 +
'''Arguments:'''
 +
 +
* String key to check.
 +
 +
'''Return value:'''
 +
 +
True if value exists.
[[LuaDocs/Index|'''Go back to Class Index''']]
[[LuaDocs/Index|'''Go back to Class Index''']]

Latest revision as of 20:17, 2 April 2015

Contents

Parent: MOSprite

Concrete Class. A sprite movable object that can rotate.

Go back to Class Index


Properties

ClassName

The class name of this Entity.A string with the friendly-formatted type name of this object.

Material

Read-only property. The main Material of this MOSRotating.The the Material of this MOSRotating.

RecoilForce

Read-only property. The current recoil impulse force Vector of this MOSprite.A const reference to the current recoil impulse force in kg * m/s.

RecoilOffset

Read-only property. The current recoil offset Vector of this MOSprite.A const reference to the current recoil offset.

IsGold

Read-only property. Indicates whether this MO is made of Gold or not.Whether this MovableObject is of Gold or not.

GibWoundLimit

Return wound limit for this object.Wound limit of the object.

GibImpulseLimit

Return impulse limit for this object.Impulse limit of the object.

WoundCount

Read-only property. Returns the amount of wound attached to this.Key to retrieve value.Wound amount.


Functions

AddRecoil

Adds graphical recoil offset to this MOSprite according to its angle.

Arguments:

  • None.

Return value:

None.


SetRecoil

Adds recoil offset to this MOSprite.

Arguments:

  • A vector with the recoil impulse force in kg * m/s.
  • A vector with the recoil offset in pixels.
  • Whether recoil should be activated or not for the next Draw().

Return value:

None.


IsRecoiled

Returns whether this MOSprite is currently under the effects of recoil.

Arguments:

  • None.

Return value:

None.


EnableDeepCheck

Sets whether or not this MOSRotating should check for deep penetrations the terrain or not.

Arguments:

  • Whether to enable deep penetration checking or not.

Return value:

None.


ForceDeepCheck

Sets to force a deep checking of this' silhouette against the terrain and create an outline hole in the terrain, generating particles of the intersecting pixels in the terrain.

Arguments:

  • Whether to force a deep penetration check for this sim frame or not..

Return value:

None.


GibThis

Gibs this, effectively destroying it and creating multiple gibs or pieces in its place.

Arguments:

  • The impulse (kg * m/s) of the impact causing the gibbing to happen. blast impulse which will push the gibs away from the center.
  • A pointer to an MO which the gibs shuold not be colliding with!

Return value:

None.


MoveOutOfTerrain

Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.

Arguments:

  • Only consider materials stronger than this in the terrain for intersections.

Return value:

Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.


ApplyForces

Gathers and applies the global and accumulated forces. Then it clears out the force list.Note that this does NOT apply the accumulated impulses (impulse forces)!

Arguments:

  • None.

Return value:

None.


ApplyImpulses

Gathers and applies the accumulated impulse forces. Then it clears out the impulse list.Note that this does NOT apply the accumulated regular forces (non-impulse forces)!

Arguments:

  • None.

Return value:

None.


AttachEmitter

Attaches an AEmitter to this MOSRotating.

Arguments:

  • The AEmitter to attach, ownership IS transferred!
  • The offset from the origin of this MOSRotating to where the AEmitter's joint is attached.
  • Whether to check if this added emitter triggers the GibWoundLimit.. sometimes that's a bad idea if potentially gibbing this would cause the m_Attachables list to be messed with while it's being iterated.

Return value:

None.


RemoveWounds

Removes a specified amount of wounds.

Arguments:

  • Amount of wounds to remove.

Return value:

Amount of damage, caused by these wounds.


IsOnScenePoint

Indicates whether this' current graphical representation overlaps a point in absolute scene coordinates.

Arguments:

  • The point in absolute scene coordinates.

Return value:

Whether this' graphical rep overlaps the scene point.


EraseFromTerrain

Cuts this' silhouette out from the terrain's material and color layers.

Arguments:

  • None.

Return value:

None.


GetStringValue

Returns the string value associated with the specified key or "" if it does not exist.

Arguments:

  • Key to retrieve value.

Return value:

String value.


GetNumberValue

Returns the number value associated with the specified key or 0 if it does not exist.

Arguments:

  • Key to retrieve value.

Return value:

Number (double) value.


GetObjectValue

Returns the object value associated with the specified key or 0 if it does not exist.

Arguments:

  • None.

Return value:

Object (Entity *) value.


SetStringValue

Sets the string value associated with the specified key.

Arguments:

  • String key and value to set.

Return value:

None.


SetNumberValue

Sets the string value associated with the specified key.

Arguments:

  • String key and value to set.

Return value:

None.


SetObjectValue

Sets the string value associated with the specified key.

Arguments:

  • String key and value to set.

Return value:

None.


RemoveStringValue

Remove the string value associated with the specified key.

Arguments:

  • String key to remove.

Return value:

None.


RemoveNumberValue

Remove the number value associated with the specified key.

Arguments:

  • String key to remove.

Return value:

None.


RemoveObjectValue

Remove the object value associated with the specified key.

Arguments:

  • String key to remove.

Return value:

None.


StringValueExists

Checks whether the value associated with the specified key exists.

Arguments:

  • String key to check.

Return value:

True if value exists.


NumberValueExists

Checks whether the value associated with the specified key exists.

Arguments:

  • String key to check.

Return value:

True if value exists.


ObjectValueExists

Checks whether the value associated with the specified key exists.

Arguments:

  • String key to check.

Return value:

True if value exists.


Go back to Class Index

Personal tools