LuaDocs/Scene

From Data Realms Wiki

(Difference between revisions)
Jump to: navigation, search
(Scene - Automatically generated by LuaBot)
(Scene - Automatically generated by LuaBot)
Line 6: Line 6:
[[LuaDocs/Index|'''Go back to Class Index''']]
[[LuaDocs/Index|'''Go back to Class Index''']]
 +
 +
 +
 +
==Enumerations==
 +
===PlacedObjectSets===
 +
* 0 = PLACEONLOAD
 +
* 1 = BLUEPRINT
 +
* 2 = AIPLAN
 +
* 3 = PLACEDSETSCOUNT
 +
Line 29: Line 39:
===WrapsY===
===WrapsY===
Read-only property. Indicates whether the scene wraps its scrolling around the Y axis.Whether the scene wraps around the Y axis or not.
Read-only property. Indicates whether the scene wraps its scrolling around the Y axis.Whether the scene wraps around the Y axis or not.
 +
 +
===TeamOwnership===
 +
Shows which team owns this Scene in a Metagame, if anyThe team that owns this site in a Metagame, if any
===GlocalAcc===
===GlocalAcc===
Line 35: Line 48:
==Functions==
==Functions==
 +
===GetBuildBudget===
 +
Shows how much gold this Scene is budgeted to be built for this round.
 +
 +
'''Arguments:'''
 +
 +
* Which player's set budget to show.
 +
 +
'''Return value:'''
 +
 +
The budget in oz that this is allocated to have built for this round.
 +
 +
 +
===SetBuildBudget===
 +
Sets how much gold this Scene is budgeted to be built for this round.
 +
 +
'''Arguments:'''
 +
 +
* The player whom is setting the budget.
 +
* The budget in oz that this is allocated to have built for this round.
 +
 +
'''Return value:'''
 +
 +
None.
 +
 +
 +
===ClearPlacedObjectSet===
 +
Removes all entries in a specific set of placed Objects.
 +
 +
'''Arguments:'''
 +
 +
* Which set of placed objects to clear. See the PlacedObjectSets enum.
 +
 +
'''Return value:'''
 +
 +
How many things were removed in teh process of clearing that set.
 +
 +
 +
===PlaceResidentBrain===
 +
Places the individual brain of a single player which may be stationed on this Scene, and registers them as such in an Activity.
 +
 +
'''Arguments:'''
 +
 +
* The player's brain to place.
 +
* The Activity to register the placed brains with.. OINT!
 +
 +
'''Return value:'''
 +
 +
If the brain was successfully found as resident and placed.
 +
 +
 +
===PlaceResidentBrains===
 +
Places the individual brains of the various players which may be stationed on this Scene, and registers them as such in an Activity.
 +
 +
'''Arguments:'''
 +
 +
* The Activity to register the placed brains with.. OINT!
 +
 +
'''Return value:'''
 +
 +
How many brains were finally placed.
 +
 +
 +
===RetrieveResidentBrains===
 +
Looks at the Activity and its players' registered brain Actors, and saves them as resident brains for this Scene. Done when a fight is over and the survivors remain!
 +
 +
'''Arguments:'''
 +
 +
* The Activity to check for registered brains.. OINT!
 +
 +
'''Return value:'''
 +
 +
How many brains were found registered with the passed in Activity.
 +
 +
 +
===GetResidentBrain===
 +
Gets the resident brain Actor of a specific player from this scene, if there is any. OINT!
 +
 +
'''Arguments:'''
 +
 +
* Which player to get the resident brain of.
 +
 +
'''Return value:'''
 +
 +
The SO containing the brain, or 0 if there aren't any of that player.
 +
 +
 +
===SetResidentBrain===
 +
Sets the resident brain Actor of a specific player from this scene, if there is any. Ownership IS transferred!
 +
 +
'''Arguments:'''
 +
 +
* Which player to set the resident brain of.
 +
* The Actor to set as the resident brain of the specified player.
 +
 +
'''Return value:'''
 +
 +
None.
 +
 +
 +
===SetArea===
 +
Adds one or modifies an existing area of this Scene.
 +
 +
'''Arguments:'''
 +
 +
* The area to add or modify of the same name in this Scene. Ownership is
 +
* NOT transferred!
 +
 +
'''Return value:'''
 +
 +
Whether the specified area was previously defined in this scene.
 +
 +
===HasArea===
===HasArea===
Checks for the existence of a specific Area identified by a name. This won't throw any errors to the console if the Area isn't found.
Checks for the existence of a specific Area identified by a name. This won't throw any errors to the console if the Area isn't found.
Line 70: Line 195:
Whether any Area of that name was found, AND the point falls within it.
Whether any Area of that name was found, AND the point falls within it.
 +
 +
 +
===ResetPathFinding===
 +
Recalculates all of the pathfinding data. This is very expensive, so do very rarely!
 +
 +
'''Arguments:'''
 +
 +
* None.
 +
 +
'''Return value:'''
 +
 +
None.
 +
 +
 +
===UpdatePathFinding===
 +
Recalculates only the areas of the pathfinding data that have been marked as outdated.
 +
 +
'''Arguments:'''
 +
 +
* None.
 +
 +
'''Return value:'''
 +
 +
None.
 +
 +
 +
===PathFindingUpdated===
 +
Tells whether the pathfinding data has been updated in the last frame.
 +
 +
'''Arguments:'''
 +
 +
* None.
 +
 +
'''Return value:'''
 +
 +
Whether the pathfinding data was recalculated fully or partially.
 +
 +
 +
===CalculatePath===
 +
Calculates and returns the least difficult path between two points on the current scene. Takes both distance and materials into account.
 +
 +
'''Arguments:'''
 +
 +
* Start and end positions on the scene to find the path between.
 +
* A list which will be filled out with waypoints between the start and end.
 +
 +
'''Return value:'''
 +
 +
The total minimum difficulty cost calculated between the two points on the scene.
[[LuaDocs/Index|'''Go back to Class Index''']]
[[LuaDocs/Index|'''Go back to Class Index''']]

Revision as of 04:40, 5 August 2011

Contents

Parent: Entity

Concrete Class. Contains everything that defines a complete scene.

Go back to Class Index


Enumerations

PlacedObjectSets

  • 0 = PLACEONLOAD
  • 1 = BLUEPRINT
  • 2 = AIPLAN
  • 3 = PLACEDSETSCOUNT


Properties

ClassName

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

Location

The specified location of this scene on the planet viewA Vector showing the location of this scene on the planet view.

Dimensions

Read-only property. The total dimensions (width and height) of the scene, in pixels.A Vector describing the scene dimensions.

Width

Read-only property. The total width of the scene, in pixels.An int describing the scene width.

Height

Read-only property. The total height of the scene, in pixels.An int describing the scene width.

WrapsX

Read-only property. Indicates whether the scene wraps its scrolling around the X axis.Whether the scene wraps around the X axis or not.

WrapsY

Read-only property. Indicates whether the scene wraps its scrolling around the Y axis.Whether the scene wraps around the Y axis or not.

TeamOwnership

Shows which team owns this Scene in a Metagame, if anyThe team that owns this site in a Metagame, if any

GlocalAcc

Read-only property. The global acceleration (in m/s^2) that is applied to all movable objects' velocities during every frame. Typically models gravity.A Vector describing the global acceleration.


Functions

GetBuildBudget

Shows how much gold this Scene is budgeted to be built for this round.

Arguments:

  • Which player's set budget to show.

Return value:

The budget in oz that this is allocated to have built for this round.


SetBuildBudget

Sets how much gold this Scene is budgeted to be built for this round.

Arguments:

  • The player whom is setting the budget.
  • The budget in oz that this is allocated to have built for this round.

Return value:

None.


ClearPlacedObjectSet

Removes all entries in a specific set of placed Objects.

Arguments:

  • Which set of placed objects to clear. See the PlacedObjectSets enum.

Return value:

How many things were removed in teh process of clearing that set.


PlaceResidentBrain

Places the individual brain of a single player which may be stationed on this Scene, and registers them as such in an Activity.

Arguments:

  • The player's brain to place.
  • The Activity to register the placed brains with.. OINT!

Return value:

If the brain was successfully found as resident and placed.


PlaceResidentBrains

Places the individual brains of the various players which may be stationed on this Scene, and registers them as such in an Activity.

Arguments:

  • The Activity to register the placed brains with.. OINT!

Return value:

How many brains were finally placed.


RetrieveResidentBrains

Looks at the Activity and its players' registered brain Actors, and saves them as resident brains for this Scene. Done when a fight is over and the survivors remain!

Arguments:

  • The Activity to check for registered brains.. OINT!

Return value:

How many brains were found registered with the passed in Activity.


GetResidentBrain

Gets the resident brain Actor of a specific player from this scene, if there is any. OINT!

Arguments:

  • Which player to get the resident brain of.

Return value:

The SO containing the brain, or 0 if there aren't any of that player.


SetResidentBrain

Sets the resident brain Actor of a specific player from this scene, if there is any. Ownership IS transferred!

Arguments:

  • Which player to set the resident brain of.
  • The Actor to set as the resident brain of the specified player.

Return value:

None.


SetArea

Adds one or modifies an existing area of this Scene.

Arguments:

  • The area to add or modify of the same name in this Scene. Ownership is
  • NOT transferred!

Return value:

Whether the specified area was previously defined in this scene.


HasArea

Checks for the existence of a specific Area identified by a name. This won't throw any errors to the console if the Area isn't found.

Arguments:

  • The name of the Area to try to find in this Scene.

Return value:

Whether the specified area is defined in this Scene.


GetArea

Gets a specific Area identified by a name. Ownership is NOT transferred!

Arguments:

  • The name of the Area to try to get.

Return value:

A pointer to the Area asked for. 0 if no Area of that name was found.


WithinArea

Checks if a point is within a specific named Area of this Scene. If no Area of the name is found, this just returns false without error.

Arguments:

  • The name of the Area to try to check against.
  • The point to see if it's within the specified Area.

Return value:

Whether any Area of that name was found, AND the point falls within it.


ResetPathFinding

Recalculates all of the pathfinding data. This is very expensive, so do very rarely!

Arguments:

  • None.

Return value:

None.


UpdatePathFinding

Recalculates only the areas of the pathfinding data that have been marked as outdated.

Arguments:

  • None.

Return value:

None.


PathFindingUpdated

Tells whether the pathfinding data has been updated in the last frame.

Arguments:

  • None.

Return value:

Whether the pathfinding data was recalculated fully or partially.


CalculatePath

Calculates and returns the least difficult path between two points on the current scene. Takes both distance and materials into account.

Arguments:

  • Start and end positions on the scene to find the path between.
  • A list which will be filled out with waypoints between the start and end.

Return value:

The total minimum difficulty cost calculated between the two points on the scene.


Go back to Class Index

Personal tools