HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Removing all skills

04-06-2008, 09:18 AM#1
RolePlaynGamer
Is there a way to remove all skills from a unit including attack, move, patrol, hold position...?
04-06-2008, 10:17 AM#2
Gorman
if you make it a ward type (i think its ward) then it will lose its regular command card, then u can just hide stuff per normal methods

Pausing will remove all except passives i think, what do u need it for exactly? coz i dont think there is a method that will still allow you to move and attack if thats wat u need
04-06-2008, 01:44 PM#3
MysticGeneral
You can remove patrol and attack. I dunno about move, hold position, and stop though.
04-06-2008, 03:52 PM#4
Rising_Dusk
Quote:
Originally Posted by MysticGeneral
I dunno about move, hold position, and stop though.
call UnitRemoveAbility(MyUnit, 'Amov')
That will kill those other three. If you want to remove all abilities including custom spells and stuff, you'll have to do it the hard way and make a function that does it all with lots of conditionals. (I know, ugly)
Collapse JASS:
if GetUnitAbilityLevel(MyUnit, 'A000') > 0 then
    call RemoveAbility(MyUnit, 'A000')
endif
if GetUnitAbilityLevel(MyUnit, 'A001') > 0 then
    call RemoveAbility(MyUnit, 'A001')
endif
if ...
04-06-2008, 06:09 PM#5
RolePlaynGamer
kk by using RemoveAbility, and removing 'Amov', i removed move, patrol and hold position. Can i remove stop and attack with a line of code?
04-06-2008, 06:15 PM#6
moyack
Attack can be disabled by adding the 'Abun' ability, stop... I don't know.
04-06-2008, 06:23 PM#7
RolePlaynGamer
I just figured out.

Collapse JASS:
call UnitRemoveAbility(<unit>, 'Amov')
call UnitRemoveAbility(<unit>, 'Aatk')

This removes all 5 abilities.