HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Remove Attack Button

07-06-2006, 07:05 AM#1
realllama
I am looking for a way to remove the attack button and possibly other default buttons from units. I wish to keep the ability to defaulty attack or possibly use some ability or cast some spell when right-clicking an enemy. I do not want to use WEU because it does not contain some triggers that are in the normal official editor and i am concerned about future compatibility.

07-06-2006, 07:20 AM#2
Sardius
I think you just disable both attacks on the unit itself under their combat settings.
07-06-2006, 07:26 AM#3
Jacek
You can give the unit Ward classification... it will make all buttons disappear, so unit will only attack automatically and you can right-click and you can cast abilities by catching right-click order (orderstring for rightclick is "smart")
07-06-2006, 01:07 PM#4
shadow1500
Quote:
possibly use some ability or cast some spell when right-clicking an enemy.
When you detect "attack" or "smart" order on an enemy unit, order the unit to use a invisible channel ability, and then have another trigger detect the cast of this ability.
07-06-2006, 01:44 PM#5
Rising_Dusk
Collapse JASS:
call UnitRemoveAbility(YourUnit, 'Aatk')
call UnitRemoveAbility(YourUnit, 'Amov')

These two calls will remove 'move', 'patrol', 'stop', 'hold ground', and 'attack' from any unit you use them on.
Do note that the game seems to bug out if you try to READD them to the unit, thus I would suggest that you simply recreate the unit/hero after whatever specific condition is met.