Target property
Selection rules used when a team script picks one building from all those of a named type.
- Engine enum
TargetPropertyType- Input form
- Integer
The two threat properties do not weigh the building. They read a running figure the team member’s own house keeps for each map region — a four-by-four block of cells, the unit the whole threat map is kept in — so Least threat heads for the quietest part of the map holding a building of that type and Greatest threat for the busiest, and neither has anything to say about how dangerous the building itself is.
That figure is neither confined to the region it is filed under nor a measure of hostile force alone. An object raising it writes across a three-by-three block of regions: its full risk, which is its type’s ThreatPosed, in the region it stands in, half of that in the four regions beside it and a quarter in the four corners, so every reading is smeared across a neighborhood.
Whose figures an object raises is settled by one test, applied as it is placed, as it crosses from one region into another, as its owner changes and as it is taken off the map. The table gives the four positions a house can hold toward the object’s owner. Only one kind of ally is spared, which is the point: an alliance protects a human house from its ally’s risk and does nothing for a computer one.
| The house keeping the figure | Is the object’s risk added to it? |
|---|---|
| The object’s own owner | No |
| A human house allied to the owner | No |
| A computer house allied to the owner | Yes |
| Any house not allied to the owner | Yes |
The rebuild a house runs whenever it makes or breaks an alliance applies that test to infantry, vehicles and aircraft alone. Everything else it counts, structures included, is added with no ownership or alliance test at all, so from that point the house’s own structures raise its own figures.
A value outside the four scores every candidate identically and therefore selects none, which leaves the team with no target and sends it on to the next line of its script.
Values
4 of 4
| Input | Meaning | Engine constant | Stored value |
|---|---|---|---|
0 | Pick the candidate standing in the map region the team's house rates as least threatened. | TPROPERTY_LEAST_THREAT | 0 |
1 | Pick the candidate standing in the map region the team's house rates as most threatened. | TPROPERTY_GREATEST_THREAT | 1 |
2 | Pick the candidate nearest the team's first member. | TPROPERTY_NEAREST | 2 |
3 | Pick the candidate farthest from the team's first member. | TPROPERTY_FARTHEST | 3 |
No enum values match this filter.
Used by
- Attack enemy building
TMISSION_ATTACK_BUILDING_WITH_PROPERTY - Moveto enemy building
TMISSION_MOVETO_BUILDING_WITH_PROPERTY
Source files
Linked at revision 59fae722af8c.