🏆 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!
🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!
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.