- Joined
- Mar 19, 2009
- Messages
- 444
Hello,
Since 2 days I have a weird bug on my maps: basic special effects like the orc Warstomp are hidden.
I use a lot of triggers so I thought those effects was hidden cause a bug etc. But it is not the case: when I test other maps I played before, the same effects wont work.
What could cause such a thing? Effects from abilities works on an other side.
Thanks a lot to answer me and have a good day.
jk2pach.
Example spell that works but the Effects is no more shown since 2-3 days (and no program installed since this etc.)
I use JNPG.
I already reinstalled Warcraft III in case it could be a corruption of MPQ. I tested on W3 Model Editor and Mdlvis the warstomp effect works fine.
Basic jump+AOE dmg/push effect. The special effect is added there:
call DestroyEffect(AddSpecialEffect(FX,x,y))
FX is a string using "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
Since 2 days I have a weird bug on my maps: basic special effects like the orc Warstomp are hidden.
I use a lot of triggers so I thought those effects was hidden cause a bug etc. But it is not the case: when I test other maps I played before, the same effects wont work.
What could cause such a thing? Effects from abilities works on an other side.
Thanks a lot to answer me and have a good day.
jk2pach.
Example spell that works but the Effects is no more shown since 2-3 days (and no program installed since this etc.)
I use JNPG.
I already reinstalled Warcraft III in case it could be a corruption of MPQ. I tested on W3 Model Editor and Mdlvis the warstomp effect works fine.
Basic jump+AOE dmg/push effect. The special effect is added there:
call DestroyEffect(AddSpecialEffect(FX,x,y))
FX is a string using "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
JASS:
scope PercussionJump initializer init
globals
private constant real AOE = 250
private constant integer SPEED = 40
private constant real IMP = 0.25
private constant integer SPELL = 'A02B'
private constant string FX = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
private constant string ANIM = "Spell Slam 2"
private constant real DMG = 100.
endglobals
private struct str
unit caster
real angle
integer distance
integer i
real dmg
integer deltaZ
endstruct
private function Update takes nothing returns nothing
local timer t = GetExpiredTimer()
local str dat = GetTimerData(t)
local real x = GetUnitX(dat.caster)
local real y = GetUnitY(dat.caster)
local real newX = x + SPEED*Cos(dat.angle)
local real newY = y + SPEED*Sin(dat.angle)
local real z = GetUnitFlyHeight(dat.caster)
local real newz = 0.00
if dat.i < dat.distance then
set dat.i = dat.i + 1
call SetUnitX(dat.caster, newX)
call SetUnitY(dat.caster, newY)
if dat.i < (dat.distance * 0.5) then
set newz = z + (dat.distance * IMP)
else
set newz = z - (dat.distance * IMP)
endif
call SetUnitFlyHeight(dat.caster,newz,0.)
else
call SetUnitPathing(dat.caster, true)
call SetUnitAnimation(dat.caster, "attack slam")
call DestroyEffect(AddSpecialEffect(FX,x,y))
call UnitDamageEnemies(dat.caster,AOE,x,y,dat.dmg,true,100,SPEED,IMP)
if dat.deltaZ > 1 then
call UnitAddBuffFract(dat.caster)
endif
call ReleaseTimer(t)
call dat.destroy()
endif
endfunction
private function Actions takes nothing returns nothing
local timer t = NewTimer()
local str dat = str.create()
local real x1 = GetUnitX(SpellEvent.CastingUnit)
local real y1 = GetUnitY(SpellEvent.CastingUnit)
local real x2 = SpellEvent.TargetX
local real y2 = SpellEvent.TargetY
set dat.deltaZ = GetTerrainCliffLevel(x1,y1)-GetTerrainCliffLevel(x2,y2)
if dat.deltaZ >= 0 then
set dat.caster = SpellEvent.CastingUnit
set dat.angle = Atan2((y2 -y1), (x2 - x1))
set dat.distance = R2I(SquareRoot((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)))/SPEED
set dat.i = 0
set dat.dmg = DMG*GetUnitAbilityLevel(dat.caster,SPELL)
call SetUnitPathing( dat.caster, false)
call SetUnitAnimation(dat.caster,ANIM)
call SetTimerData(t, dat)
call TimerStart (t, TIMEOUT, true, function Update )
else
call ReleaseTimer(t)
call dat.destroy()
endif
endfunction
public function init takes nothing returns nothing
call RegisterSpellFinishResponse(SPELL, Actions)
endfunction
endscope