so lemme get this straight
you have a variable named players
but instead of being an array of players its an array of units
ok well thats kinda weird but lets keep going
next up is your choice of smiley face. makes me question things.
- Quote :
- I tried to make a Collision Because Pat said it was better than Immolation.
yes; the rest of the world including pat
- Quote :
- I spawn my DH's With a Trigger.
i'm guessing this is where your problems are coming from trying to reference things that dont exist
ie you create your demon hunters after the game starts via a trigger
but before game starts you have a bunch of triggers (see collision) which are referencing these future demon hunters. you can do this but you need to make use of the variable that references the demon hunters correctly (ie not the way youre doing it now)
try this:
function Trig_hero_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(udg_Players[0]) == 'Edem' ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(11) ) ) then
return false
endif
return true
endfunction
function Trig_hero_Actions takes nothing returns nothing
call KillUnit( udg_Players[0] )
endfunction
//===========================================================================
function InitTrig_hero takes nothing returns nothing
set gg_trg_hero = CreateTrigger( )
call TriggerRegisterUnitInRangeSimple( gg_trg_hero, 45.00, null )
call TriggerAddCondition( gg_trg_hero, Condition( function Trig_hero_Conditions ) )
call TriggerAddAction( gg_trg_hero, function Trig_hero_Actions )
endfunction
then in your trigger that creates the demon hunters at the beginning of the game, make sure to remember to add them to your array "Player"
and lastly thank you for putting
- Spoiler:
(Immolation)
in a spoiler. that really helped me keep my screen from being cluttered and unworkable.