🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
function onCast takes nothing returns nothing
local string path=""
local integer i=0
loop
exitwhen i==bj_MAX_PLAYERS
if (IsPlayerAlly(GetOwningPlayer(GetTriggerUnit()),Player(i)) then
set path="special\effect\path"
endif
set i=i+1
endloop
call AddSpecialEffect(path,0,0)
endfunction
function onCast takes nothing returns nothing
local string path=""
if IsPlayerAlly(GetOwningPlayer(GetTriggerUnit()),GetLocalPlayer()) then
set path="special\effect\path"
endif
call AddSpecialEffect(path,0,0)
endfunction
The JASS script will desync every battle.net game you try to play. It needs this instead:
JASS:
function onCast takes nothing returns nothing
local string path = "special\\effect\\path.mdl"
if IsPlayerEnemy(GetTriggerPlayer(), GetLocalPlayer()) then
set path = ""
endif
call AddSpecialEffect(path, 0, 0)
endfunction
The string needs to be initialized before entering the "local player" block.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.