I make a trigger, and I need a unit to create a unit under it, the unit is the spawner, but to select the unit-type you have to use the preselect, and in default preselect there is only no unit, i want to know how to put unit in there
I am unable to help you either. apocalypse_dude is right about variable using "unit" type to use recall pre-selected unit. But we are still unsure if you used variable improperly or didn't match your need.
See how this works:
blowup
Events
Player - Player 1 (Red) Selects a unit
Conditions
Actions
If (unitselected Equal to (Triggering unit)) then do (Unit - Explode (Triggering unit)) else do (Set unitselected = (Triggering unit))
unitselected is a variable "unit" type
Here's a picture, there's Peasant, Footman, and Knight on a screen. Before player Red click on unit, inside unitselected is BLANK. Once upon clicking on Peasant, it check to see if clicked unit is same as BLANK - it's not the same, ELSE - it added Peasant to unitselected variable (to get rid of BLANK). Then Player Red clicked on Knight, it check to see if Peasant is same as Knight - it's not the same, ELSE - it added Knight to unitselected (to get rid of old Peasant from variable). Now Player Red click on same Knight again - it check to see if Knight is same as Knight from unitselected variable. It is the same - ACTION - blow up this unit.