• 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!

[General] Specialeffect only show for one Team

Status
Not open for further replies.
Yes, you'll need localplayer. The key to making this work is that Warcraft will desync if a special effect exists for only some of the players... but that special effect is actually rendered based on its filepath, and that can be different for different players without causing a desync.

So, first step: get the string for the green effect's filepath, and the string for the red effect's filepath. Save them as separate variables, then make a third variable for the effect's filepath.

Next step: When the trigger that goes with the spell is fired, use localplayer to figure out if an ally or an enemy is casting. If it's an ally, set that third variable equal to the first one (for the green effect,) otherwise set the third variable to the second one (for the red effect.)

Last step: When you get to the part of the trigger where you actually create the special effect, use that third variable for the effect's filepath.
 
  • Something
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Awesome Spell
    • Actions
      • Set SFX_Model = <Empty String>
      • Custom script: if IsPlayerAlly(GetLocalPlayer(), Player(0)) then
      • Set SFX_Model = Abilities\Spells\Undead\AntiMagicShell\AntiMagicShell.mdl
      • Custom script: else
      • Set SFX_Model = Abilities\Spells\Undead\Curse\CurseTarget.mdl
      • Custom script: endif
      • Set Point = (Center of (Playable map area))
      • Special Effect - Create a special effect at Point using SFX_Model
      • Custom script: call RemoveLocation(udg_Point)
Should look something like this
 
Status
Not open for further replies.
Back
Top