It is strange that it doesn't let you assign a single unit variable. There may be a workaround in assigning your center unit to a Unit Group variable, and then using the "Unit from Unit Group" function to pick that unit.
i have a unit, but the player should select which one he wants to have, it will be saved into a variable and i dont want to create each untitype for every player before map starts
and you cna not use a unit variable in an event so i need a custom script for adding an event to a trigger
If you know how to properly remove the model/actor whatever of a unit and change it to another, i f ound that you can add a new actor to it that it takes over, but i can tfind how to delete the actual one
Are you talking about the entering unit, then? Because that accepts a Unit variable, but it doesn't accept Unit Type values.
If you just want to compare the entering unit's Unit Type, either of these methods ought to work:
ACTION: compare the entering unit's Unit Type in a for loop that indexes through a predefined array of the available Unit Types
CONDITION: compare the entering unit's Unit Type to an array of the player's selected Unit Types for this detection
Changing the Actor of a unit will change the Actor, but not the Unit Type. There should be Condition comparisons that allow you to detect individual Actors, though.
I know that this is possible, so can anyone tell me how i can do this?
I need: Add event - any unit enters 3.5 radius of unit since you can not use variables in events
I assume you mean the center unit?
It is strange that it doesn't let you assign a single unit variable. There may be a workaround in assigning your center unit to a Unit Group variable, and then using the "Unit from Unit Group" function to pick that unit.
hm noooo
i have a unit, but the player should select which one he wants to have, it will be saved into a variable and i dont want to create each untitype for every player before map starts
and you cna not use a unit variable in an event so i need a custom script for adding an event to a trigger
If you know how to properly remove the model/actor whatever of a unit and change it to another, i f ound that you can add a new actor to it that it takes over, but i can tfind how to delete the actual one
Are you talking about the entering unit, then? Because that accepts a Unit variable, but it doesn't accept Unit Type values.
If you just want to compare the entering unit's Unit Type, either of these methods ought to work:
ACTION: compare the entering unit's Unit Type in a for loop that indexes through a predefined array of the available Unit Types
CONDITION: compare the entering unit's Unit Type to an array of the player's selected Unit Types for this detection
Changing the Actor of a unit will change the Actor, but not the Unit Type. There should be Condition comparisons that allow you to detect individual Actors, though.