AddGuardPost
- Parameters
id integerRawcode for unit type of the guard unit
x realy real- comment
This marks a spot at point (x,y) as a guard post and a unit of specified type will be guarding that spot. The spot will remain empty until the function
FillGuardPostsis called, after that the specified unit will go to guard that spot. If the unit is killed another one will replace it. However, this process is not unlimited, by default, the unit is replaced 3 times but if the nativeSetReplacementCount(N)is called in the AI script the unit will be replaced N times. Note that if this is used on heroes they will be trained only but will not go to the post.- patch
1.00
- Source
- common.ai (raise an issue to discuss on Github or submit a PR)
- return type
nothing- Source code
native AddGuardPost takes integer id, real x, real y returns nothing