Module twdll_unit
Functions for interacting with campaign units.
Functions
| SetNumberOfMan (unit, value) | Sets the current number of man in the unit. |
| SetMaxNumberOfMan (unit, value) | Sets the maximum number of man in the unit. |
| SetMovementPoints (unit, value) | Sets the remaining movement points for the unit. |
| GetNumberOfMan (unit) | Gets the current number of man in the unit. |
| GetMaxNumberOfMan (unit) | Gets the maximum number of man in the unit. |
| GetMovementPoints (unit) | Gets the remaining movement points for the unit. |
| GetMemoryAddress (unit) | Returns the memory address of the real unit object as a hexadecimal string. |
Functions
- SetNumberOfMan (unit, value)
-
Sets the current number of man in the unit.
Parameters:
- unit userdata the unit object (first argument)
- value integer new number of man
- SetMaxNumberOfMan (unit, value)
-
Sets the maximum number of man in the unit.
Parameters:
- unit userdata the unit object (first argument)
- value integer new maximum number of man
- SetMovementPoints (unit, value)
-
Sets the remaining movement points for the unit.
Parameters:
- unit userdata the unit object (first argument)
- value integer new movement points
- GetNumberOfMan (unit)
-
Gets the current number of man in the unit.
Parameters:
- unit userdata the unit object (first argument)
Returns:
-
integer
current number of man
- GetMaxNumberOfMan (unit)
-
Gets the maximum number of man in the unit.
Parameters:
- unit userdata the unit object (first argument)
Returns:
-
integer
maximum number of man
- GetMovementPoints (unit)
-
Gets the remaining movement points for the unit.
Parameters:
- unit userdata the unit object (first argument)
Returns:
-
integer
movement points
- GetMemoryAddress (unit)
-
Returns the memory address of the real unit object as a hexadecimal string.
Parameters:
- unit userdata the unit object (first argument)
Returns:
-
string
memory address (e.g. "0x12345678")