- Joined
- Mar 23, 2007
- Messages
- 302
Hi, i did a Jassed spell for a Unit (Hero:Sniper).It is a Combination with another one. Spell: create a Illusion (in this case its the standart Human Priest ('hmpr')).
This one is fine. The ultimate is the problem. I worked with JassCraft if its important to know.
What is the ultimate supposed to do?
it has a casting time of 3 seconds and deals 999999.00 dmg (simply kills).
when the Sniper uses the Ultimate the Priests should act like him.
they should wait the same time, reveal like the sniper for the attacked enemy and then play the animation like the sniper does.
i just cant find the wrong part y.y.
and yes i will remove the leaks as far as i got this work.
thx for the Help.
This one is fine. The ultimate is the problem. I worked with JassCraft if its important to know.
What is the ultimate supposed to do?
it has a casting time of 3 seconds and deals 999999.00 dmg (simply kills).
when the Sniper uses the Ultimate the Priests should act like him.
they should wait the same time, reveal like the sniper for the attacked enemy and then play the animation like the sniper does.
JASS:
function Trig_Imitate_Ultimate_Conditions takes nothing returns boolean
return (GetUnitTypeId(GetSpellAbilityUnit()) == 'H00C' and GetSpellAbilityId() == 'A023')
endfunction
function Trig_Imitate_Ultimate_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local unit target = GetSpellTargetUnit()
local player Tp = GetOwningPlayer(target)
local location Ploc = GetUnitLoc(GetEnumUnit())
local location Cloc = GetUnitLoc(caster)
local group myGroup = GetUnitsInRectAll(GetPlayableMapRect())
local group g = CreateGroup()
local unit fake
local fogmodifier fog
local real R = 512
local integer Type = 'hmpr'
call GroupAddGroup(myGroup, g)
loop
set fake = FirstOfGroup(g)
exitwhen fake == null
if ( GetUnitTypeId(fake) == Type ) then
call PauseUnit( fake,true)
call SetUnitFacingToFaceUnitTimed( fake, target, 0 )
call CreateFogModifierRadiusLoc( Tp , FOG_OF_WAR_VISIBLE, Ploc, R,true,true )
set fog = GetLastCreatedFogModifier()
call TriggerSleepAction( 3.00 )
call SetUnitAnimation( fake, "attack" )
call TriggerSleepAction( 1.00 )
call PauseUnit( fake,false )
call DestroyFogModifier( fog )
endif
call GroupRemoveUnit(g, fake)
endloop
call DestroyGroup(g)
call CreateFogModifierRadiusLoc( Tp , FOG_OF_WAR_VISIBLE, Cloc, R,true,true )
set fog = GetLastCreatedFogModifier()
call TriggerSleepAction( 4.00 )
call DestroyFogModifier( fog )
endfunction
i just cant find the wrong part y.y.
and yes i will remove the leaks as far as i got this work.
thx for the Help.