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

Special Effects

Status
Not open for further replies.
Btw, that desyncs. =)

Use this instead:
  • Sfx
    • Events
    • Conditions
    • Actions
      • Set StringVar = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Custom script: if GetLocalPlayer() != GetTriggerPlayer() then
      • Set StringVar = <Empty String>
      • Custom script: endif
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using StringVar
  • ---------- Don't type out <Empty String>, just leave the string blank when you set the variable -------------------
StringVar: Set this to the path of the special effect. Just copy and paste from the special effect creation action thing.
Change "GetTriggerPlayer()" to whatever player you want. If you want a specific player, change it to "Player(#)". Or as Pharaoh said, GetOwningPlayer(UNIT)
Change "Triggering Unit" to whichever unit you want to attach it to.
JASS:
Player(0)       //Player 1 (red)
Player(1)       //Player 2 (blue)
Player(2)       //Player 3 (teal)
Player(3)       //Player 4 (purple)
Player(4)       //etc...
Player(5)
Player(7)
Player(8)
Player(9)
Player(10)
Player(11)
Player(12)
Player(13)
Player(14)
Player(15)

Anyway, creating handles (such as effects/units etc.) causes desyncs in local player blocks. And the reason why I did it in the weird manor with a string variable is so that the string table stays synced, since using a string for the first time can cause a desync as well in local player blocks as well.
 
Level 3
Joined
Feb 23, 2010
Messages
73
those triggers will allow all players to see the effect though.

if you only want one player to actually see the effect,
you need to create a dummy unit that has both permanent invis and locust.
1:Set the cast time for permanent invis to 0.
2:make your dummy unit's model file that of the special effect you would like.
3:make sure you give him the correct animation names if needed.

now make a trigger that creates this dummy unit at the position of your desired unit (that you want the effect on). make sure you define him with a global var.
Set the trigger to remove him after the effects animation time.

EX.
  • Actions
    • Unit - create 1 dummy for (owner of (YourHero)) at (position of (YourHero)) facing default building degrees
    • Set (EffectDummy) = last created unit
    • Wait (Howerver long your animation time is) seconds
    • Remove EffectDummy from the game
Because the effect is actually a unit that is invisable, only you (or allies with shared vision) will see it. I hope that helps :/
 
Status
Not open for further replies.
Top