Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function AddSpecialEffectForPlayer takes string modelpath, real x, real y, player whichplayer returns effect local string s = ""
if GetLocalPlayer() == whichplayer then
set s = modelpath
endif
return AddSpecialEffect(modelpath, x, y)
endfunction
Trigger
Events

Unit - A unit starts the effect of an ability
Conditions
Actions

Custom script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then

Special Effect - Create a special effect attached on the chest of (Triggering unit) using <path>

Custom script: endif
function AddLocalEffect takes player p, string path, real x, real y returns effect
if GetLocalPlayer() != p then
set path=""
endif
return AddSpecialEffect(path, x, y)
endfunction
Dont try that.
This is how it should be done:
JASS:function AddLocalEffect takes player p, string path, real x, real y returns effect if GetLocalPlayer() != p then set path="" endif return AddSpecialEffect(path, x, y) endfunction
