• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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