function AddSpecialEffectForPlayer takes string sfxpath, real x, real y, player p returns effect
local string path = ""
if GetLocalPlayer() == p then
set path = sfxpath
endif
return AddSpecialEffect( path, x, y )
endfunction
function AddSpecialEffectForPlayer takes string sfxpath, real x, real y, player p returns effect
local string path = sfxpath
if GetLocalPlayer() != p then
set path = ""
endif
return AddSpecialEffect( path, x, y )
endfunction
Trigger:
- n
- Events
- Conditions
- Actions
- Set Path = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
- Custom script: if GetLocalPlayer() != GetTriggerPlayer() then
- Set Path = <Empty String>
- Custom script: endif
- Special Effect - Create a special effect at (Center of (Playable map area)) using Path
Then READ the trigger again.
if GetLocalPlayer() != GetTriggerPlayer() then
Okay, first:
Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
This if the path of thunder clap effect, as you probably now.
JASS:if GetLocalPlayer() != GetTriggerPlayer() then
If local player(take a look at here: http://www.thehelper.net/forums/showthread.php?t=89207) not equal to triggering player change Path string variable.But Path variable is still same for Triggering player.So, for other players, it is something like,
Trigger:
- Special Effect - Create a special effect at (Center of (Playable map area)) using "Empty String"
but for triggering player,
Trigger:
- Special Effect - Create a special effect at (Center of (Playable map area)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
function AddSpecialEffectForPlayer takes string sfxpath, real x, real y, player p returns effect
local string path = sfxpath
if GetLocalPlayer() != p then
set path = ""
endif
return AddSpecialEffect( path, x, y )
endfunction
function foo takes nothing returns nothing
local string s = null
if GetLocalPlayer() == some_player then
set s = "string not yet in string table" // ooops desync?
call AddSpecialEffect(s, x, y)
endif
endfunction