HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to remove some button like "Move" "Hold" .. of Hero

04-18-2006, 11:38 AM#1
chien86
I try to remove these button to add more ability for my Hero by add Unit Classification: Ward. But it won't show any button ???
I want only remove these button !
Someone help me !!
04-18-2006, 11:51 AM#2
vile
well
you can only remove the Move and Attack buttons of a unit, but take notice that you cannot give it back afterwards!

To remove attack:
Custom Script: call UnitRemoveAbility(unit, 'Aatk')
To remove move:
Custom Script: call UnitRemoveAbility(unit, 'Amov')

unit is the unit, if its a casting spell use GetSpellAbilityUnit(), if its a global variable instead of unit put udg_GLOBALVARNAME

If you want triggering unit, use GetTriggerUnit()
04-18-2006, 12:48 PM#3
Captain Griffen
I'd suggest you make use of spellbook instead, as otherwise your hero won't be able to attack/move.
04-18-2006, 07:24 PM#4
The)TideHunter(
Actually, iv found its possible to add and remove any ability.
Lets take Aloc, well known locust ability.
After youv give it to the unit, but you want to click it again, pause the unit and unpause it, it gets refreshed and it exactly the same.
Dunno about attack and move, il go test now.
04-18-2006, 08:48 PM#5
vile
It doesnt work. Move and attack arent really abilities, 'Aloc' is.
04-19-2006, 01:18 AM#6
chien86
I tried 2 custom :

To remove attack:
Custom Script: call UnitRemoveAbility(unit, 'Aatk')
To remove move:
Custom Script: call UnitRemoveAbility(unit, 'Amov')

But it make my hero can't move !!
How can I HIDE some button like Move, Hold, Patrol ?
Anyone have idea ?
04-19-2006, 01:39 AM#7
shadow1500
You cannot hide them without hiding all abilties, use a spellbook.
04-19-2006, 03:41 AM#8
chien86
U mean use spellbook for those ability(hold, move, patrol) ?
or
Use on all my Hero's Skill that I want to add ?

Ah, I don't want to use spellbook on my Hero's Skill because, I must be click on it and choose skill to cast. Is there any way to hide 3 button (hold, move,patrol) ?
04-19-2006, 06:28 AM#9
vile
It's the only way dude.
04-19-2006, 09:24 AM#10
PerfectlyInsane
hmmm I need to remove the patrol button? any ideas?
04-19-2006, 02:57 PM#11
blu_da_noob
Random thought here; has anyone ever tried disabling the move/attack abilities for a player?
04-19-2006, 03:29 PM#12
vile
Yea, doesnt work
04-19-2006, 04:22 PM#13
PitzerMike
Well, it's possible to at least disable move with a tech requirement (simply use an invisible unit and change ownership to enable/disable move)
I don't know if that also disables stop/hold position and I also can't remember if it works for attack as well.

Oh, and you'll most likely need a modified AbilityData file to see the move/attack abilities in the ability editor.
04-19-2006, 04:22 PM#14
Anitarf
How about using Vexorian's spelbook trick to move the move/attack abilities to a spellbook? Probably won't do it either.
04-19-2006, 06:54 PM#15
shadow1500
3 Options:
1. Dont do anything.
2. Use a spellbook, put all spells in it, then force player to press the spellbook hotkey evertime the unit is selected.
3. Trigger movement/attacking with keyboard.