Limit Polymorph?

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
I think he means like how in World of Warcraft the Mage can only ever have one active Polymorph at a time. Casting on a new target will remove the buff from the previous target (if any).

It's pretty simple to do with a Unit Indexer:
  • Polymorph Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Polymorph
    • Actions
      • Set VariableSet Polymorph_Caster_ID = (Custom value of (Triggering unit))
      • Set VariableSet Polymorph_Target_ID = (Custom value of (Target unit of ability being cast))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Polymorph_Target[Polymorph_Caster_ID] Not equal to No unit
          • Polymorph_Source[(Custom value of Polymorph_Target[Polymorph_Caster_ID])] Equal to (Triggering unit)
        • Then - Actions
          • Unit - Remove Polymorph buff from Polymorph_Target[Polymorph_Caster_ID]
        • Else - Actions
      • Set VariableSet Polymorph_Source[Polymorph_Target_ID] = (Triggering unit)
      • Set VariableSet Polymorph_Target[Polymorph_Caster_ID] = (Target unit of ability being cast)
 

Attachments

  • Polymorph Single Buff 1.w3m
    22.2 KB · Views: 5
Level 5
Joined
Aug 2, 2015
Messages
69
I think he means like how in World of Warcraft the Mage can only ever have one active Polymorph at a time. Casting on a new target will remove the buff from the previous target (if any).

It's pretty simple to do with a Unit Indexer:
  • Polymorph Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Polymorph
    • Actions
      • Set VariableSet Polymorph_Caster_ID = (Custom value of (Triggering unit))
      • Set VariableSet Polymorph_Target_ID = (Custom value of (Target unit of ability being cast))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Polymorph_Target[Polymorph_Caster_ID] Not equal to No unit
          • Polymorph_Source[(Custom value of Polymorph_Target[Polymorph_Caster_ID])] Equal to (Triggering unit)
        • Then - Actions
          • Unit - Remove Polymorph buff from Polymorph_Target[Polymorph_Caster_ID]
        • Else - Actions
      • Set VariableSet Polymorph_Source[Polymorph_Target_ID] = (Triggering unit)
      • Set VariableSet Polymorph_Target[Polymorph_Caster_ID] = (Target unit of ability being cast)
Thats the one, cheers Uncle
 
Top