- Joined
- Jul 2, 2008
- Messages
- 156
Here's my desired effect:
Unit cast spell on another unit
Unit becomes zombie
Floating text appears over the changed unit reading "Villager Zombified!"
Zombie moves to rally point of casting unit.
In GUI this was easy to accomplish with no problems whatsoever, but when I redid the trigger in JASS, the floating text has refused to appear.
My Code:
At first I suspected that the trigger was going too fast, so I added a
after the variable u changes, but it didn't solve anything.
I'm sure the problem is real obvious and I'm just being a ditz, but I appreciate the help all the same.
Unit cast spell on another unit
Unit becomes zombie
Floating text appears over the changed unit reading "Villager Zombified!"
Zombie moves to rally point of casting unit.
In GUI this was easy to accomplish with no problems whatsoever, but when I redid the trigger in JASS, the floating text has refused to appear.
My Code:
JASS:
function Trig_Conversion_Actions takes nothing returns nothing
local unit u= GetSpellTargetUnit()
local player p= GetOwningPlayer(GetSpellAbilityUnit())
local unit t= udg_TowerOfSouls[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))]
call IssueImmediateOrder( u, "stop" )
call UnitAddAbility( t, 'A002' )
call TriggerSleepAction( 1.00 )
call IssueTargetOrder( t, "darkconversion", u )
call TriggerSleepAction( 1.00 )
call AddHeroXPSwapped( 5, GetSpellAbilityUnit(), true )
call UnitRemoveAbility( t, 'A002' )
call SetUnitOwner( u, p, true )
call ReplaceUnitBJ( u, 'n000', bj_UNIT_STATE_METHOD_RELATIVE )
set u= GetLastReplacedUnitBJ()
call SetUnitPathing( u, true )
call TriggerSleepAction( 0.50 )
call CreateTextTagUnitBJ( "|cffff0000Villager Zombified!|r", u, 0, 8.00, 100, 100, 100, 0 )
call SetTextTagVelocity( GetLastCreatedTextTag(), 64, 90 )
call SetTextTagPermanent( GetLastCreatedTextTag(), false )
call SetTextTagLifespan( GetLastCreatedTextTag(), 2.00 )
call TriggerSleepAction( 1.00 )
if ((GetRallyX(t) != 0) or (GetRallyY(t) != 0)) then
call IssuePointOrder( u, "move", GetRallyX(t), GetRallyY(t) )
else
endif
endfunction
At first I suspected that the trigger was going too fast, so I added a
JASS:
TriggerSleepAction( 0.50 )
I'm sure the problem is real obvious and I'm just being a ditz, but I appreciate the help all the same.
