• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Show Effect to 1 Person

Status
Not open for further replies.
it works,but the custom script was a bit wrong

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Custom script: if (GetLocalPlayer()) == Player(0) then
      • Special Effect - Create a special effect at (Center of (Playable map area)) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Custom script: endif
player 0 = player 1
player 1 = player 2
player 3 = player 4
......
 
JASS:
if GetLocalPlayer = <Player> then
call AddSpecialEffectLoc("effectPath", location)
endif

That desyncs because you are creating a handle (with an id > 0x100000 (1045876 or so iirc) within that block. =D

The proper way is to do it like this:
JASS:
function Test takes nothing returns nothing
    local string s = "war3mapImported\\FX.mdl"

    if GetLocalPlayer() != Player(0) then //modify Player(0)
        set s = ""
    endif
    call DestroyEffect(AddSpecialEffect(s,0.,0.))
endfunction

Player(0) is the player you want to show it for. Basically, set a string to your path, and locally set it to "" for all players but that player. The reason for this odd method (rather than directly setting the path with the GetLocalPlayer() == Player) is to keep the string tables synced when using a string for the first time.

Basically:
  • Whee
    • Events
    • Conditions
    • Actions
      • Set MyString = "war3mapImported\\FX.mdl"
      • Custom Script: if GetLocalPlayer() != Player(0) then
      • Set MyString = <Empty String>
      • Custom Script: endif
      • Special Effect - Create a special effect at <loc> using MyString... etc.
 
Status
Not open for further replies.
Back
Top