LuaDocs/SceneObject
From Data Realms Wiki
Contents |
Parent: Entity
Abstract Class. The base class shared by Both TerrainObject:s and MovableObject:s, ie anything that can be places in a scene.
Properties
ClassName
The class name of this SceneObject.A string with the friendly-formatted type name of this object.
Pos
The absolute position of this SceneObject.A Vector describing the current absolute position in pixels.
HFlipped
Returns whether this is being drawn flipped horizontally (around the vertical axis), or not.Whether flipped or not.
RotAngle
The current rotational angle of of this, in radians.The rotational angle of this, in radians.
Team
Gets which team this belongs to.The currently assigned team number.
PlacedByPlayer
Gets which player placed this object in the scene, if any.The player responsible for placing this is in the scene, if any.
IsBuyable
Read-only property. Shows whether this should appear in teh buy menus at all.Buyable or not.
Functions
GetGoldValue
Gets the cost to purchase this item, in oz's of gold.
Arguments:
- If this is supposed to be adjusted for a specific Tech's subjective value, then pass in the native DataModule ID of that tech. 0 means no Tech is specified and the base value is returned.
- How much to multiply the value if this happens to be a foreign Tech.
Return value:
The cost, in oz of gold.
GetGoldValueString
Gets a descriptive string describing the cost to purchase this item, in oz's of gold.
Arguments:
- If this is supposed to be adjusted for a specific Tech's subjective value, then pass in the native DataModule ID of that tech. 0 means no Tech is specified and the base value is returned.
- How much to multiply the value if this happens to be a foreign Tech.
Return value:
The cost, described in a friendly to read string: "100oz", or "Free"
GetTotalValue
Gets the total liquidation value of this, including everything inside.
Arguments:
- If this is supposed to be adjusted for a specific Tech's subjective value, then pass in the native DataModule ID of that tech. 0 means no Tech is specified and the base value is returned.
- How much to multiply the value if this happens to be a foreign Tech.
Return value:
The current value of this and all contained assets.
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.