• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Spell] Local Player actions with custom script

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
#1
  • Enemies of Player
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set p = (Position of (Triggering unit))
      • Player Group - Pick every player in (All enemies of (Triggering player)) and do (Actions)
        • Loop - Actions
          • Custom script: if GetLocalPlayer() == GetEnumPlayer() then
          • Set SFX = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Custom script: endif
          • Special Effect - Create a special effect at p using SFX
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_p)
#2
  • Enemies of Owner Picked Unit
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set p = (Position of (Triggering unit))
      • Set UnitGroup = (Units of type Paladin)
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Player Group - Pick every player in (All enemies of (Owner of (Picked unit))) and do (Actions)
            • Loop - Actions
              • Custom script: if GetLocalPlayer() == GetEnumPlayer() then
              • Set SFX = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
              • Custom script: endif
              • Special Effect - Create a special effect at p using SFX
              • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_p)
      • Custom script: call DestroyGroup(udg_UnitGroup)
In this trigger, I make the picked unit to be all enemies of Paladin will only see the Special Effect

Variables:
p = Point
SFX = String
UnitGroup = UnitGroup
 
Status
Not open for further replies.
Top