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

[Spell] How to make an effect visible to allies only?

Status
Not open for further replies.
Level 14
Joined
Nov 18, 2007
Messages
1,084
There's a great tutorial by PurgeandFire111 about that, though it does require some Jass/custom script in GUI. Scroll down to" "Manipulating the Editor's System:"

What the code from the tutorial would look like in GUI:
  • Custom script: local string s = "MY_SFX_PATH.mdx"
  • Custom script: if GetLocalPlayer() != Player(0) then
  • Custom script: set s = ""
  • Custom script: endif
  • Custom script: call DestroyEffect(AddSpecialEffect(s,0.,0.))
 
@ZendZz trigger above is very right, but if you have problems with custom scripting use String variables, since watermelon_1234 wrote jass script :D

  • Set Effectstring ="<stuff>"
Now you have to use function which runs through players egzecuting code, filtering all players when finished it's actions. There is no way to get rid of jass/custom script here.

What DSG mentioned, is fact that if don't set string before filtering through players via GetLocalPlayer() it will cause desync. Rest actions like above, but again, you can use normal GUI actions if you have troubles for nulling string (empty string) and for Creating and destroing effects.

  • Set Effectstring = <Empty string>
  • Special Effect - Create ...
  • Special Effect - Destroy (Last created special effect)
 
Status
Not open for further replies.
Top