Denegoth
New Member
- Reaction score
- 18
In my map I have a hero selection area with many taverns. There has never been a single problem with it until now. I recently added another hero (With nothing strange that should have caused a bug). Now in a 5v5 game, whenever I select the hero, it appears to not be getting stored in the Hero variable, meaning it cannot be manipulated using that variable. This causes problems as I use the variable a lot. +rep to whoever can tell me the problem.
PS: The code probably leaks, but I don't particularly give a damn.
PS: The code probably leaks, but I don't particularly give a damn.
Trigger:
- Hero Sale
- Events
- Unit - A unit Sells a unit
- Conditions
- ((Sold unit) is A Hero) Equal to True
- Actions
- Wait 0.10 seconds
- Unit Group - Pick every unit in (Units owned by (Owner of (Sold unit)) of type Hero Selection) and do (Actions)
- Loop - Actions
- Unit - Remove (Picked unit) from the game
- Loop - Actions
- Unit - Move (Sold unit) instantly to ((Owner of (Sold unit)) start location)
- Camera - Pan camera for (Owner of (Sold unit)) to ((Owner of (Sold unit)) start location) over 0.00 seconds
- Selection - Select (Sold unit) for (Owner of (Sold unit))
- Set Hero[(Player number of (Owner of (Sold unit)))] = (Sold unit)
- Special Effect - Create a special effect attached to the origin of (Sold unit) using GeneralHeroGlow.mdx
- Unit - Change color of (Sold unit) to (Color of (Owner of (Sold unit)))
- Player Group - Pick every player in (All players) and do (Actions)
- Loop - Actions
- Player - Make (Unit-type of Hero[(Player number of (Owner of (Sold unit)))]) Unavailable for training/construction by (Picked player)
- Loop - Actions
- Events