Bitfighter
021
The Bitfighter Lua Documentation - Robots, Levelgens, and Plugins
|
Spawns Flags at regular intervals during Nexus games, serves as starting point for flags and soccer balls in other games.
Member Functions | |
getGeom() | |
Returns an object's geometry. | |
getId() | |
Gets an object's user assigned id. [details] | |
getObjType() | |
Gets an object's ObjType. [details] | |
getOwner() | |
Gets an object's owner as a PlayerInfo. [details] | |
getPos() | |
Gets an object's position. [details] | |
getSpawnTime() | |
Get the interval between item emissions, in seconds. [details] | |
getTeamIndex() | |
Gets the index of the object's team. [details] | |
isSelected() | |
Determine if an object is selected in the editor. [details] | |
removeFromGame() | |
Removes the object from the current game or editor session. [details] | |
setGeom(geometry) | |
Sets an object's geometry. [details] | |
setId(id) | |
Sets an object's user assigned id. [details] | |
setOwner(playerName) | |
Sets the owner of the object. [details] | |
setPos(pos) | |
Set the object's position. [details] | |
setSelected(selected) | |
Set whether an object is selected in the editor. [details] | |
setSpawnTime(seconds) | |
Sets time between item emission events, in seconds. [details] | |
setTeam(teamIndex) | |
Assigns the object to a team. [details] | |
spawnNow() | |
Force the ItemSpawn to spawn an item immediately. [details] | |
Spawns Flags at regular intervals during Nexus games, serves as starting point for flags and soccer balls in other games.
During Nexus games, FlagSpawn acts like any other ItemSpawn, emitting flags at regular intervals. During games that use flags (such as ZoneControl), FlagSpawns mark locations where flags can be returned to when flags are "sent home". In Soccer games, marks the location that the SoccerBall is returned to after a goal is scored.
Note that in flag games, any place a flag starts will become a FlagSpawn, and in Soccer, the location the SoccerBall starts will become a FlagSpawn.
|
inherited from BfObject |
Returns an object's geometry.
|
inherited from BfObject |
Gets an object's user assigned id.
Users can assign an id to elements in the editor with the ! or # keys. Use this function to obtain this id. If the user has not assigned an object an id, getId() will return a negative id that will remain consistent throught the game.
|
inherited from BfObject |
Gets an object's ObjType.
See ObjType for a list of possible return values.
|
inherited from BfObject |
Gets an object's owner as a PlayerInfo.
Some objects (like projectiles) have an owning player associated. This method returns a PlayerInfo object if there is an owner. Otherwise, returns nil.
This method is intended to be used with bullets and other projectiles, not with game objects like zones.
|
inherited from BfObject |
Gets an object's position.
For objects that are not points (such as a LoadoutZone), will return the object's centroid.
|
inherited from ItemSpawn |
Get the interval between item emissions, in seconds.
|
inherited from BfObject |
Gets the index of the object's team.
Many BfObjects (such as TestItems) are never part of any particular team. For these objects, this method will return Team.Neutral
.
|
inherited from BfObject |
Determine if an object is selected in the editor.
This is useful for editor plugins only.
true
if the object is selected, false
if not.
|
inherited from BfObject |
Removes the object from the current game or editor session.
May not be implemented for all objects.
|
inherited from BfObject |
Sets an object's geometry.
geometry | The object's new geometry. |
Note that not all objects support changing geometry if the object has already been added to a game.
|
inherited from BfObject |
Sets an object's user assigned id.
Users can assign an id to elements in the editor with the ! or # keys. Use this function to set this id from Lua. When called from an editor plugin, the value passed will be displayed in the editor when the player presses ! or #.
|
inherited from BfObject |
Sets the owner of the object.
playerName | Name of player as a string. |
This method is intended to be used with bullets and other projectiles, not with game objects like zones.
|
inherited from BfObject |
Set the object's position.
To set the full geometry of a more complex object, see the setGeom() method.
pos | The new position of the object. |
|
inherited from BfObject |
Set whether an object is selected in the editor.
This is useful for editor plugins only.
selected | true to select the object, false to deselect it. |
|
inherited from ItemSpawn |
Sets time between item emission events, in seconds.
Note that setting the spawn time also resets the timer, so that the next item will be spawned after time seconds.
seconds | Spawn time in seconds. |
|
inherited from BfObject |
Assigns the object to a team.
teamIndex | Index of the team the object should be assigned to. (first team index is 1; there is no team 0) |
Instead of a team index, you can use the special team enums Team.Neutral
and Team.Hostile
.
Limitations:
|
inherited from ItemSpawn |
Force the ItemSpawn to spawn an item immediately.
This method also resets the spawn timer.