diff --git a/data/utils/temp-utils.cfg b/data/utils/temp-utils.cfg index 6193ac121ea..4d2b9f51582 100644 --- a/data/utils/temp-utils.cfg +++ b/data/utils/temp-utils.cfg @@ -34,25 +34,3 @@ [/redraw] #enddef -# Creates a unit of TYPE belonging to SIDE at X,Y. UNIT_ID can be used when filtering on it. -# For example, lets create a wose for player 1 at 4,7 -# {CREATE_UNIT 1 "Wose" 4 7 () ()} - -# As a second example, lets make it a female wose which can recruit and is name "Woselina": -# {CREATE_UNIT 1 "Wose" 4 7 "Woselina" ( -# canrecruit=1 -# )} - -#define CREATE_UNIT SIDE TYPE X Y UNIT_ID OTHER - [unit] - side={SIDE} - type={TYPE} - x={X} - y={Y} - description={UNIT_ID} - - upkeep=full - animate=yes - {OTHER} - [/unit] -#enddef diff --git a/data/utils/utils.cfg b/data/utils/utils.cfg index 3ffc55b3817..6c2d65d7b4c 100644 --- a/data/utils/utils.cfg +++ b/data/utils/utils.cfg @@ -40,6 +40,7 @@ # IS_HERO # UNIT # UNDEAD_UNIT +# CREATE_UNIT # MOVE_UNIT # MODIFY_UNIT # STORE_UNIT_VAR @@ -273,6 +274,32 @@ message={MSG} #enddef +# Creates a unit of TYPE belonging to SIDE at X,Y. UNIT_ID can be used +# when filtering on it. For example, let's create a wose for player 1 +# at 4,7 +# +# {CREATE_UNIT 1 "Wose" 4 7 () ()} +# +# As a second example, let's make it a female wose which can recruit and +# is name "Woselina": +# +# {CREATE_UNIT 1 "Wose" 4 7 "Woselina" ( +# canrecruit=1 +# )} + +#define CREATE_UNIT SIDE TYPE X Y UNIT_ID OTHER + [unit] + side={SIDE} + type={TYPE} + x={X} + y={Y} + description={UNIT_ID} + + upkeep=full + animate=yes + {OTHER} + [/unit] +#enddef # Moves a unit from its current location to the given location along a # relatively straight line displaying the movement just like [move_unit_fake] # does.