LuaDocs/MovableManager

From Data Realms Wiki

(Difference between revisions)
Jump to: navigation, search
(MovableManager - Automatically generated by LuaBot)
(MovableManager - Automatically generated by LuaBot)
Line 124: Line 124:
An Actor pointer to the requested team's Actor closest to the Scene point, but not outside the max radius. If no Actor other than the excluded one was found within the radius of the point, 0 is returned.
An Actor pointer to the requested team's Actor closest to the Scene point, but not outside the max radius. If no Actor other than the excluded one was found within the radius of the point, 0 is returned.
 +
 +
 +
===GetFirstTeamActor===
 +
Get a pointer to first best Actor in the internal Actor list that is of a specifc team.
 +
 +
'''Arguments:'''
 +
 +
* Which team to try to get an Actor for. 0 means first team, 1 means 2nd.
 +
* The player to get the Actor for. This affects which brain can be marked.
 +
 +
'''Return value:'''
 +
 +
An Actor pointer to the first one of the requested team. If no Actor is in that team, 0 is returned.
Line 140: Line 153:
An Actor pointer to the requested Actor closest to the Scene point, but not outside the max radius. If no Actor other than the excluded one was found within the radius of the point, 0 is returned.
An Actor pointer to the requested Actor closest to the Scene point, but not outside the max radius. If no Actor other than the excluded one was found within the radius of the point, 0 is returned.
 +
 +
 +
===GetClosestBrainActor===
 +
Get a pointer to the brain actor of a specific team that is closest to a scene point. OINT.
 +
 +
'''Arguments:'''
 +
 +
* Which team to try to get the brain for. 0 means first team, 1 means 2nd.
 +
* The point in the scene where to look for the closest opposite team brain.
 +
 +
'''Return value:'''
 +
 +
An Actor pointer to the requested team's brain closest to the point. 0 if there are no brains of that team. OINT.
 +
 +
 +
===GetFirstBrainActor===
 +
Get a pointer to the brain actor of a specific team that is closest to a scene point. OINT.
 +
 +
'''Arguments:'''
 +
 +
* Which team to try to get the brain for. 0 means first team, 1 means 2nd.
 +
* The point in the scene where to look for the closest opposite team brain.
 +
 +
'''Return value:'''
 +
 +
An Actor pointer to the requested team's brain closest to the point. 0 if there are no brains of that team. OINT.
 +
 +
 +
===GetClosestOtherBrainActor===
 +
Get a pointer to the brain actor NOT of a specific team that is closest to a scene point. OINT.
 +
 +
'''Arguments:'''
 +
 +
* Which team to NOT get the brain for. 0 means first team, 1 means 2nd.
 +
* The point where to look for the closest brain not of this team.
 +
 +
'''Return value:'''
 +
 +
An Actor pointer to the requested brain closest to the point. 0 if there are no brains not on that team. OINT.
 +
 +
 +
===GetFirstOtherBrainActor===
 +
Get a pointer to the brain actor NOT of a specific team. OINT.
 +
 +
'''Arguments:'''
 +
 +
* Which team to NOT get the brain for. 0 means first team, 1 means 2nd.
 +
 +
'''Return value:'''
 +
 +
An Actor pointer to the requested brain of that team. 0 if there are no brains not on that team. OINT.
Line 320: Line 384:
Whether the object was found in MovableMan's custody, and consequently removed. If the MO entry wasn't found, false is returned.
Whether the object was found in MovableMan's custody, and consequently removed. If the MO entry wasn't found, false is returned.
 +
 +
 +
===OpenAllDoors===
 +
Opens all doors and keeps them open until this is called again with false.
 +
 +
'''Arguments:'''
 +
 +
* Whether to open all doors (true), or undo this action (false)
 +
* Which team to do this for. NOTEAM means all teams.
 +
 +
'''Return value:'''
 +
 +
None.
===IsParticleSettlingEnabled===
===IsParticleSettlingEnabled===
-
Shows whetehr particles are set to get copied to the terrain upon settling/
+
Shows whetehr particles are set to get copied to the terrain upon settling
'''Arguments:'''
'''Arguments:'''

Revision as of 04:40, 5 August 2011

Contents

Has no parent class

Generic Class. The singleton manager of all movable objects in the RTE.

Go back to Class Index


Properties

MaxDroppedItems

The max number of dropped items that will be reached before the first dropped with be copied to the terrain.An int spefifying the limit.

ScriptedEntity

The entity temporarily to be tranferred to the Lua interface for its preset-defined scripts to be run on it.The entity pointer made accessible to the Lua state.


Functions

GetMOFromID

Gets a MO from its MOID. Note that MOID's are only valid during the same frame as they were assigned to the MOs!

Arguments:

  • The MOID to get the matching MO from.

Return value:

A pointer to the requested MovableObject instance. 0 if no MO with that MOID was found. 0 if 0 was passed in as MOID (no MOID). Ownership is *NOT* transferred!!


GetMOIDCount

Gets the number of MOID's currently in use this frame.

Arguments:

  • None.

Return value:

The count of MOIDs in use this frame.


PurgeAllMOs

Clears out all MovableObject:s out of this. Effectively empties the world of anything moving, without resetting all of this' settings.

Arguments:

  • None.

Return value:

None.


GetNextActorInGroup

Get a pointer to the first Actor in the internal Actor list that is of a specifc group, alternatively the first one AFTER a specific actor!

Arguments:

  • Which group to try to get an Actor for.
  • A pointer to an Actor to use as starting point in the forward search.
  • Ownership NOT xferred!

Return value:

An Actor pointer to the requested team's first Actor encountered in the list. 0 if there are no Actors of that team.


GetPrevActorInGroup

Get a pointer to the last Actor in the internal Actor list that is of a specifc group, alternatively the last one BEFORE a specific actor!

Arguments:

  • Which group to try to get an Actor for.
  • A pointer to an Actor to use as starting point in the backward search.
  • Ownership NOT xferred!

Return value:

An Actor pointer to the requested team's last Actor encountered in the list. 0 if there are no Actors of that team.


GetNextTeamActor

Get a pointer to the first Actor in the internal Actor list that is of a specifc team, alternatively the first one AFTER a specific actor!

Arguments:

  • Which team to try to get an Actor for. 0 means first team, 1 means 2nd.
  • A pointer to an Actor to use as starting point in the forward search.
  • Ownership NOT xferred!

Return value:

An Actor pointer to the requested team's first Actor encountered in the list. 0 if there are no Actors of that team.


GetPrevTeamActor

Get a pointer to the last Actor in the internal Actor list that is of a specifc team, alternatively the last one BEFORE a specific actor!

Arguments:

  • Which team to try to get an Actor for. 0 means first team, 1 means 2nd.
  • A pointer to an Actor to use as starting point in the backward search.
  • Ownership NOT xferred!

Return value:

An Actor pointer to the requested team's last Actor encountered in the list. 0 if there are no Actors of that team.


GetClosestTeamActor

Get a pointer to an Actor in the internal Actor list that is of a specifc team and closest to a specific scene point.

Arguments:

  • Which team to try to get an Actor for. 0 means first team, 1 means 2nd.
  • The player to get the Actor for. This affects which brain can be marked.
  • The Scene point to search for the closest to.
  • The maximum radius around that scene point to search.
  • A float to be filled out with the distance of the returned closest to the search point. Will be unaltered if no object was found within radius.
  • An Actor to exclude from the search. OINT.

Return value:

An Actor pointer to the requested team's Actor closest to the Scene point, but not outside the max radius. If no Actor other than the excluded one was found within the radius of the point, 0 is returned.


GetFirstTeamActor

Get a pointer to first best Actor in the internal Actor list that is of a specifc team.

Arguments:

  • Which team to try to get an Actor for. 0 means first team, 1 means 2nd.
  • The player to get the Actor for. This affects which brain can be marked.

Return value:

An Actor pointer to the first one of the requested team. If no Actor is in that team, 0 is returned.


GetClosestActor

Get a pointer to an Actor in the internal Actor list that is closest to a specific scene point.

Arguments:

  • Which team to try to get an Actor for. 0 means first team, 1 means 2nd.
  • The Scene point to search for the closest to.
  • The maximum radius around that scene point to search.
  • A float to be filled out with the distance of the returned closest to the search point. Will be unaltered if no object was found within radius.
  • An Actor to exclude from the search. OINT.

Return value:

An Actor pointer to the requested Actor closest to the Scene point, but not outside the max radius. If no Actor other than the excluded one was found within the radius of the point, 0 is returned.


GetClosestBrainActor

Get a pointer to the brain actor of a specific team that is closest to a scene point. OINT.

Arguments:

  • Which team to try to get the brain for. 0 means first team, 1 means 2nd.
  • The point in the scene where to look for the closest opposite team brain.

Return value:

An Actor pointer to the requested team's brain closest to the point. 0 if there are no brains of that team. OINT.


GetFirstBrainActor

Get a pointer to the brain actor of a specific team that is closest to a scene point. OINT.

Arguments:

  • Which team to try to get the brain for. 0 means first team, 1 means 2nd.
  • The point in the scene where to look for the closest opposite team brain.

Return value:

An Actor pointer to the requested team's brain closest to the point. 0 if there are no brains of that team. OINT.


GetClosestOtherBrainActor

Get a pointer to the brain actor NOT of a specific team that is closest to a scene point. OINT.

Arguments:

  • Which team to NOT get the brain for. 0 means first team, 1 means 2nd.
  • The point where to look for the closest brain not of this team.

Return value:

An Actor pointer to the requested brain closest to the point. 0 if there are no brains not on that team. OINT.


GetFirstOtherBrainActor

Get a pointer to the brain actor NOT of a specific team. OINT.

Arguments:

  • Which team to NOT get the brain for. 0 means first team, 1 means 2nd.

Return value:

An Actor pointer to the requested brain of that team. 0 if there are no brains not on that team. OINT.


GetUnassignedBrain

Get a pointer to the first brain actor of a specific team which hasn't been assigned to a player yet.

Arguments:

  • Which team to try to get the brain for. 0 means first team, 1 means 2nd.

Return value:

An Actor pointer to the requested team's first brain encountered in the list that hasn't been assigned to a player. 0 if there are no unassigned brains of that team.


GetParticleCount

Gets the number of particles (MOPixel:s) currently held.

Arguments:

  • None.

Return value:

The number of particles.


GetAGResolution

Gets the global default AtomGroup resolution setting.

Arguments:

  • None.

Return value:

The global AtomGroup resolution setting, from 1 (highest res) upward.


GetSplashRatio

Gets the global setting for how much splash MOPixels should be created an MO penetrates the terrain deeply.

Arguments:

  • None.

Return value:

A float with the global splash amount setting, form 1.0 to 0.0.


SortTeamRoster

Sets this to draw HUD lines for a specific team's roster this frame.

Arguments:

  • Which team to have lines drawn of.

Return value:

None.


RemoveActor

Removes an Actor from the internal list of MO:s. After the Actor is removed, ownership is effectively released and transferred to whatever client called this method.

Arguments:

  • A pointer to the MovableObject to remove.

Return value:

Whether the object was found in the particle list, and consequently removed. If the particle entry wasn't found, false is returned.


RemoveItem

Removes a pickup-able MovableObject item from the internal list of MO:s. After the item is removed, ownership is effectively released and transferred to whatever client called this method.

Arguments:

  • A pointer to the MovableObject to remove.

Return value:

Whether the object was found in the particle list, and consequently removed. If the particle entry wasn't found, false is returned.


RemoveParticle

Removes a MovableObject from the internal list of MO:s. After the MO is removed, ownership is effectively released and transferred to whatever client called this method.

Arguments:

  • A pointer to the MovableObject to remove.

Return value:

Whether the object was found in the particle list, and consequently removed. If the particle entry wasn't found, false is returned.


ValidMO

Indicates whether the passed in MovableObject pointer points to an MO that's currently active in the simulation, and kept by this MovableMan. Internal optimization is made so that the same MO can efficiently be checked many times during the same frame.

Arguments:

  • A pointer to the MovableObject to check for being actively kept by this MovableMan.

Return value:

Whether the MO instance was found in the active list or not.


IsActor

Indicates whether the passed in MovableObject is an active Actor kept by this MovableMan or not.

Arguments:

  • A pointer to the MovableObject to check for Actorness.

Return value:

Whether the object was found in the Actor list or not.


IsDevice

Indicates whether the passed in MovableObject is an active Item kept by this MovableMan or not.

Arguments:

  • A pointer to the MovableObject to check for Itemness.

Return value:

Whether the object was found in the Item list or not.


IsParticle

Indicates whether the passed in MovableObject is an active Item kept by this MovableMan or not.

Arguments:

  • A pointer to the MovableObject to check for Itemness.

Return value:

Whether the object was found in the Particle list or not.


IsOfActor

Indicates whether the passed in MOID is that of an MO which either is or is parented to an active Actor by this MovableMan, or not.

Arguments:

  • An MOID to check for Actorness.

Return value:

Whether the object was found or owned by an MO in the Actor list or not.


GetRootMOID

Produces the root MOID of the MOID of a potential child MO to another MO.

Arguments:

  • An MOID to get the root MOID of.

Return value:

The MOID of the root MO of the MO the passed-in MOID represents. This will be the same as the MOID passed in if the MO is a root itself. It will be equal to g_NoMOID if the MOID isn't allocated to an MO.


RemoveMO

Removes a MovableObject from the any and all internal lists of MO:s. After the MO is removed, ownership is effectively released and transferred to whatever client called this method.

Arguments:

  • A pointer to the MovableObject to remove.

Return value:

Whether the object was found in MovableMan's custody, and consequently removed. If the MO entry wasn't found, false is returned.


OpenAllDoors

Opens all doors and keeps them open until this is called again with false.

Arguments:

  • Whether to open all doors (true), or undo this action (false)
  • Which team to do this for. NOTEAM means all teams.

Return value:

None.


IsParticleSettlingEnabled

Shows whetehr particles are set to get copied to the terrain upon settling

Arguments:

  • None.

Return value:

Whether enabled or not.


EnableParticleSettling

Sets whether particles will get copied into the terrain upon them settling down.

Arguments:

  • Whether to enable or not.

Return value:

None.


IsMOSubtractionEnabled

Shows whether MO's sihouettes can get subtracted from the terrain at all.

Arguments:

  • None.

Return value:

Whether enabled or not.


Go back to Class Index

Personal tools