Hello!
I dont think I will need JASS for much but local variables would be a god send. However, am I dealing with the aftermath correctly?
This is a simple movement system for a TD.
The last line, by definition, does nothing as the variable has been nulled, should I use DestroyUnitPool instead?
Thanks in advance!
I dont think I will need JASS for much but local variables would be a god send. However, am I dealing with the aftermath correctly?
This is a simple movement system for a TD.
-
Movement P1
-
Events
-
Conditions
-
Actions
-
Custom script: local location loco
-
Custom script: local unit enteringUnit
-
Custom script: set enteringUnit = GetEnteringUnit()
-
Custom script: call SetUnitUserData(enteringUnit, ( GetUnitUserData(enteringUnit) + 1 ))
-
Custom script: set loco = GetRandomLocInRect(udg_regions_P1[GetUnitUserData(enteringUnit)])
-
Custom script: call IssuePointOrderLoc(enteringUnit, "move", loco)
-
Custom script: set loco = null
-
Custom script: set enteringUnit = null
-
Custom script: call RemoveLocation(loco)
-
Custom script: call RemoveUnit(enteringUnit)
-
-
The last line, by definition, does nothing as the variable has been nulled, should I use DestroyUnitPool instead?
Thanks in advance!