Again, I have no clue how you manage to do it, but I can't replicate it no matter the case, can't help you. Check with GetEffectX/Y if it even moved it at all.
function Init takes unit u returns nothing
set t = CreateTimer()
set e = AddSpecialEffect("Units\\Human\\Footman\\Footman.mdx",GetUnitX(u),GetUnitY(u))
call TimerStart(t,0.01,true,function MoveEffect)
function
function MoveEffect takes nothing returns nothing
call SetEffectPosition(e,GetUnitX(u),GetUnitY(u),150)
function
The effect will not be visible when it leaves the place where it was created
SetEffectPosition takes Z in consideration, and it is NOT autocorrecting via terrain Z, hence it's most likely under the ground:
So, for the future, first test things properly, before thinking it's a bug. :D
Use GetLocationZ to get proper Z and then add it to your needed Z, so it will be GetLocationZ( Location( GetUnitX(u), GetUnitY(u) ) ) ) + 150.
Also, it's very important to add "." to numbers of type real, so the game doesn't constantly use i2r opcode, as to not waste game's resources for no real need.
try SetEffectPosition(eTemp,9999,9999)? 0 is too close to 100, and it is still within the range of the screen.
set u = CreateUnit(Player(0), 'H000', 28708., - 29145., 270)
set e = AddSpecialEffect("Units\\Human\\Footman\\Footman.mdx",28008.,-29145.)
call SetEffectPosition(ef,GetUnitX(u),GetUnitY(u),100)
↑ the effect is visible
set u = CreateUnit(Player(0), 'H000', 28708., - 29145., 270)
set e = AddSpecialEffect("Units\\Human\\Footman\\Footman.mdx",16652.,-16652.)
call SetEffectPosition(ef,GetUnitX(u),GetUnitY(u),100)
↑ the effect is invisible
function Init takes unit u returns nothing
set t = CreateTimer()
set e = AddSpecialEffect("Units\\Human\\Footman\\Footman.mdx",GetUnitX(u),GetUnitY(u))
call TimerStart(t,0.01,true,function MoveEffect)
function
function MoveEffect takes nothing returns nothing
call SetEffectPosition(e,GetUnitX(u),GetUnitY(u),150)
function
The effect will not be visible when it leaves the place where it was created
2.SetEffectPosition() or SetEffectX(),SetEffectY() , Special effects will disappear after leaving the birth point,Maybe the model vision box hasn't been updated.
» WarCraft 3 / MemoryHackAPI
call UnitDisableControl(Hero)
call UnitEnableControl(Hero)
» WarCraft 3 / MemoryHackAPI
» WarCraft 3 / MemoryHackAPI
Ред. pengyi
» WarCraft 3 / MemoryHackAPI
set e = AddSpecialEffect("Units\\Human\\Footman\\Footman.mdx",28008.,-29145.)
call SetEffectPosition(ef,GetUnitX(u),GetUnitY(u),100)
↑ the effect is visible
set e = AddSpecialEffect("Units\\Human\\Footman\\Footman.mdx",16652.,-16652.)
call SetEffectPosition(ef,GetUnitX(u),GetUnitY(u),100)
↑ the effect is invisible
» WarCraft 3 / MemoryHackAPI
set t = CreateTimer()
set e = AddSpecialEffect("Units\\Human\\Footman\\Footman.mdx",GetUnitX(u),GetUnitY(u))
call TimerStart(t,0.01,true,function MoveEffect)
function
function MoveEffect takes nothing returns nothing
call SetEffectPosition(e,GetUnitX(u),GetUnitY(u),150)
function
Ред. pengyi
» WarCraft 3 / MemoryHackAPI