HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Several Questions

10-22-2002, 03:21 PM#1
Guest
After working about two weeks on a custom Defense map, I've come up with the following questions (some technical, some not).

1) When a unit that belongs to a UnitGroup dies, is it automatically removed from the group or should you manually remove it? I ask because I would hate for WC3 to be iterating through a UnitGroup that it thinks has 1000 units, but only 10 of which are alive.

2) When an enemy unit recovers from a Bash effect, it seems to go into "Attack Nearest" mode even if the previous orders were "Move To". How can that be prevented?

3) I've noticed that if a building has a special Ability, and you upgrade TO that building, it doesn't have it's Abilities. I had to do a "Replace <X> Unit with <X> Unit" inside a trigger. Why would that happen?

4) My builder unit has a collision of 0.0 and has Collision turned Off, yet if they are standing NEAR a building being upgraded, when the building finishes (actually, when the Trigger to Replace the Unit occurs), the builder seems to get in the way and the building created offset from center. How can I prevent this from occuring?

And I guess that's it for now ... thank you for your help!
10-22-2002, 05:29 PM#2
Insaniteus
1: They stay in the unit group. To remove, run a trigger.
Event - a unit owned by player _ dies.
Actions - Unit group - remove unit from unit group.

2: I aint got a damn clue! Ask weaaddar or something.

3: Town Halls and other upgrade buildings are always one building, the original. The Keep in world editor is just like having a custom unit based off of the town hall, only using the alternate animation tag. If you want a building to only have an ability after being upgraded, give it the ability to start with and do this trigger (I will use Town hall, you use whatever)
Event- Map initialisation
Action - Player - Disable (Ability) for player _

Event - A unit owned by player _ finishes an upgrade
Conditions - triggering unit type equal to Keep
Action - Player - Enable (Ability) for player _

4: Collision affects how the unit treats other thing, and not vice versa. Your peon can walk through walls, but if he blocks a narrow passageway, nobody can get past him. My solution to this would be:
Actions - Region - Center region _ on position of building
------------Unit - Replace building with new building
------------Unit - Turn collision off for new building
------------Unit - Move unit insantly to center of region _

Hope this helps!

PS: Download my Cinematics Map in my thread, it is seriously the best movie map ever made!

-The Great and Immortal Lord Imperialist Insaniteus-
----------------------"I have been chosen by the big metal hand in the sky"