HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

autoattacking problem

02-26-2007, 11:10 AM#1
my_pkpk
I put a paladin and an Ogre on a simple map, added this in Melee Initialization:
Collapse JASS:
function Trig_Melee_Initialization_Actions takes nothing returns nothing
    call MeleeStartingVisibility()
    call UnitAddTypeBJ( UNIT_TYPE_PEON, gg_unit_nomg_0000 )
endfunction

//===========================================================================
function InitTrig_Melee_Initialization takes nothing returns nothing
    set gg_trg_Melee_Initialization = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
endfunction

UnitAddTypeBJ added a "worker" type on the Ogre, so the Ogre should no longer do autoattacking, but actually it failed to work ? why ?
please have a look at these 2 threads:
http://www.wc3campaigns.net/showthre...classification
http://www.wc3campaigns.net/showthre...ght=disable+AI
02-28-2007, 03:30 PM#2
StockBreak
I had the same problem with my dummy casters (I didn't want to see the "waiting peon" icon on the left but I wanted them not auto-attacking targets; using the UnitAddType didn't work as you said) and I solved it by adding a cooldown to my dummy spells or removing the attack from it.

N.B: a peon will attack the attacking unit if it is another peon.