public class Unit
extends Object
Modifier and Type | Method and Description |
---|---|
void |
trDamageUnit(float amt)
Does a specific amount of damage to HP in instant typeless damage.
|
void |
trDamageUnitPercent(float percent)
Does % percent of a unit's total HP in instant typeless damage.
|
void |
trDamageUnitsInArea(int playerID,
int unitType,
float dist,
float damage)
All units within distance of the selected reference object that match type take damage.
|
void |
trImmediateUnitGarrison(string unitScenarioName)
Instantly garrisons units inside another unit without considering distance.
|
void |
trSetUnitIdleProcessing(bool b)
Sets whether or not units can do their idle processing.
|
bool |
trUnitAlive()
Returns true if all selected units are alive
|
void |
trUnitBuildUnit(string protoUnit,
vector position)
Selects units and makes the build a unit at specified location.
|
void |
trUnitChangeInArea(int fromID,
int toID,
string fromProto,
string toProto,
float Dist)
Changes all units in a given radius around the selected units.
|
void |
trUnitChangeName(string name)
Set an override name for a specific unit.
|
void |
trUnitChangeProtoUnit(string protoUnit)
Changes the proto unit for a given set of units.
|
void |
trUnitConvert(int playerID)
Converts the selected units to player.
|
void |
trUnitCreate(string protoName,
string scenarioName,
float x,
float y,
float z,
int heading,
int playerID)
Creates a new unit.
|
bool |
trUnitDead()
Returns true if all selected units are dead.
|
void |
trUnitDelete(bool remove)
Removes or kills the selected unit(s)
|
void |
trUnitDestroy()
Destroys the selected unit(s).
|
float |
trUnitDistanceToPoint(float x,
float y,
float z)
Returns the shortest distance between the trRT units and the point.
|
float |
trUnitDistanceToUnit(string unitScenarioName)
Returns the shortest distance between the trRT units and the given unit.
|
float |
trUnitDistanceToUnitID(int unitID)
Returns the shortest distance between the selected units and the given unit.
|
void |
trUnitDoWorkOnUnit(string unitScenarioName,
int eventID)
Tasks the selected unit(s) to perform work on the given unit.
|
void |
trUnitEjectContained()
Ejects all contained units
|
void |
trUnitGarrison(string unitScenarioName,
int eventID)
Tasks the selected unit(s) to garrison into another unit.
|
int |
trUnitGetContained()
Returns the number of units contained.
|
int |
trUnitGetHeading(string scenarioName)
Returns the units heading.
|
bool |
trUnitGetIsContained(string matchType)
Returns true if this unit is contained by a matching type unit.
|
bool |
trUnitHasLOS(int playerID)
Returns true if the player can see the selected unit, otherwise returns false.
|
void |
trUnitHighlight(int seconds)
Does something to highlight the units selected
|
bool |
trUnitIsOwnedBy(int playerID)
Determines if the selected units are owned by the player specified
|
bool |
trUnitIsSelected()
Returns if the specified unit is selected.
|
void |
trUnitMoveFromArea(float x,
float y,
float z,
int eventID,
bool attackMove,
int playerID,
string unitType,
float radius)
Moves all matching units near the selected unit(s) to the given position.
|
void |
trUnitMoveToPoint(float x,
float y,
float z,
int eventID,
bool attackMove)
Moves the selected unit(s) to the given position.
|
void |
trUnitMoveToUnit(string unitScenarioName,
int eventID,
bool attackMove)
Moves the selected unit(s) to the spot occupied by the given unit.
|
bool |
trUnitOnLush(bool lush,
int playerID)
Checks whether the selected units location matches lush for the given player.
|
int |
trUnitPercentComplete()
Returns the percent complete as 0 to 100.
|
int |
trUnitPercentDamaged()
Returns the percent damaged as 0 to 100.
|
void |
trUnitSetAnimation(string animationName,
bool loop,
int eventID)
Sets the animations for the selected unit(s) to the given animation.
|
void |
trUnitSetHeading(int degrees)
Sets the units heading.
|
void |
trUnitSetHP(float hitpoints)
Set the hit points for all selected units.
|
void |
trUnitSetStance(string stance)
Set the stance for the given set of units.
|
void |
trUnitTeleport(float x,
float y,
float z)
Moves units from current position to position specified.
|
bool |
trUnitTypeIsSelected(string protoUnit)
Returns true if the specified unit is selected.
|
bool |
trUnitVisToPlayer(int playerID)
Returns true if the player can see the selected unit, and it is on screen.
|
public void trDamageUnit(float amt)
public void trDamageUnitPercent(float percent)
public void trDamageUnitsInArea(int playerID, int unitType, float dist, float damage)
public bool trUnitAlive()
public void trUnitBuildUnit(string protoUnit, vector position)
public void trUnitChangeInArea(int fromID, int toID, string fromProto, string toProto, float Dist)
public void trUnitChangeName(string name)
public void trUnitChangeProtoUnit(string protoUnit)
public void trUnitConvert(int playerID)
public void trUnitCreate(string protoName, string scenarioName, float x, float y, float z, int heading, int playerID)
public bool trUnitDead()
public void trUnitDelete(bool remove)
public void trUnitDestroy()
public float trUnitDistanceToPoint(float x, float y, float z)
public float trUnitDistanceToUnit(string unitScenarioName)
public float trUnitDistanceToUnitID(int unitID)
public void trUnitDoWorkOnUnit(string unitScenarioName, int eventID)
public void trUnitEjectContained()
public void trUnitGarrison(string unitScenarioName, int eventID)
public int trUnitGetContained()
public int trUnitGetHeading(string scenarioName)
public bool trUnitGetIsContained(string matchType)
public bool trUnitHasLOS(int playerID)
public void trUnitHighlight(int seconds)
public bool trUnitIsOwnedBy(int playerID)
public bool trUnitIsSelected()
public void trUnitMoveFromArea(float x, float y, float z, int eventID, bool attackMove, int playerID, string unitType, float radius)
public void trUnitMoveToPoint(float x, float y, float z, int eventID, bool attackMove)
public void trUnitMoveToUnit(string unitScenarioName, int eventID, bool attackMove)
public bool trUnitOnLush(bool lush, int playerID)
public int trUnitPercentComplete()
public int trUnitPercentDamaged()
public void trUnitSetAnimation(string animationName, bool loop, int eventID)
public void trUnitSetHeading(int degrees)
public void trUnitSetHP(float hitpoints)
public void trUnitSetStance(string stance)
public void trUnitTeleport(float x, float y, float z)
public bool trUnitTypeIsSelected(string protoUnit)
public bool trUnitVisToPlayer(int playerID)
public void trSetUnitIdleProcessing(bool b)
public void trImmediateUnitGarrison(string unitScenarioName)