editor_kid
New Member
- Reaction score
- 11
///This thread is closed///(again)
ok thanksYou can copy a trigger as text by right clicking the name (above Events), and clicking "Copy as Text".
Use that instead of manually typing the trigger out.
First, post some real triggers. Not freehand.
Second, your first "trigger" leaks.
Third, "Set PlayerGroup = (All Players)". Totally pointless.
Fourth, how about a demo map?
Trigger:
- Events
- Unit-A unit enters Tavern Region 098 <Gen>
- Conditions
- ((entering unit)is a hero) Equal to True
- Actions
- Set temp_point=(center of outside region 00 <gen>
- Unit-Move (Entering Unit) Instantly to temp_point
- Custom Script: call RemoveLocation (udg_temp_point)
- Camera-Pan Camera for (owner of(entering unit)) to (center of(outside region 00 <gen>)) over 1 seconds
Please add Rep :thup: Thank you.....
Why use a pre-placed region? Just use the event "A Unit Is Sold" event along with "Sold Unit is a Hero = True".
Still leaks, as the camera is moving to the region. You should destroy the temp point after you pan the camera.
You don't need the unit next to the tavern anymore after you get a hero unless you're planning on allowing multiple heroes. you could set a unit group for all units owned by owner of entering unit matching unit type of matching unit is equal to the unit next to the tavern, then do pick all units in unit group and remove, then do call DestroyGroup(udg_UnitGroup)
of course, it's only optional if you don't want people to try to exploit and get a second hero.