| 11-28-2007, 03:19 PM | #1 |
I have a no target reveal comprised of a total of 2 abilities: Reveal == A001 Reveal (dummy) = A002 The reveal never casts (obviously) but I can't figure out why...as near as I can tell, the dummy caster isn't even being created at the proper location (I've changed the dummy caster from dummy.mdx to an abomination model, and it doesnt appear when the Reveal (A001) is cast. JASS:function Trig_Reveal_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A001' endfunction function Trig_Reveal_Actions takes nothing returns nothing local unit u = GetTriggerUnit() local unit r // dummy caster unit local location l = GetUnitLoc(u) local integer level = GetUnitAbilityLevel( u, 'A001' ) set r = CreateUnitAtLoc( GetOwningPlayer(r), 'e000', l, 1 ) call UnitApplyTimedLife( r, 'B000', 1) call UnitAddAbility( r, 'A002' ) call SetUnitAbilityLevel( r, 'A002', level ) call IssuePointOrderLoc( r, "farsight", l ) call RemoveLocation( l ) set u = null set r = null set l = null endfunction //=========================================================================== function InitTrig_Reveal takes nothing returns nothing set gg_trg_Reveal = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Reveal, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Reveal, Condition( function Trig_Reveal_Conditions ) ) call TriggerAddAction( gg_trg_Reveal, function Trig_Reveal_Actions ) endfunction |
| 11-28-2007, 03:55 PM | #2 |
First thing I noticed is that you use the wrong unit to get the player. JASS:set r = CreateUnitAtLoc( GetOwningPlayer(u), 'e000', l, 1 ) |
| 11-28-2007, 04:17 PM | #3 |
haha, stupid error. Yep that fixed it. |
