Help with Multi Target Duration Ability Triggering!

chadpiety123

New Member
Reaction score
0
How do i code this ability. I'd really appreciate any algorithm spoonfeeding - just a step by step of what to do. I'm new at using vJass and I hope someone can help me. Thanks! Please be specific.

Duration: 12
Skill Type: Active, Area Targeted, Buff, Debuff, Minor Disable
Casting Range: 800
AoE: 350/400/450/500
Cooldown: 15/12/9/6
Mana Cost: 80/90/100/110
Level 1 - 3% movement speed change, 350 AoE
Level 2 - 6% movement speed change, 400 AoE
Level 3 - 9% movement speed change, 450 AoE
Level 4 - 12% movement speed change, 500 AoE
Framekwork:
Targets with this status gain or lose (allies gain and enemies lose) movement speed whenever they lose mana. The move speed variations lasts 5 seconds and stacks 3 times (refreshes) maximum. Casting this same ability to a target already inflicted refreshes the duration. Furthermore, more especially if possible, this skill should disregard mana reductions from autocasts like Impetus, Searing Arrows and etc. to avoid abuse.
 

HellCraft

Member
Reaction score
19
Try this:
It adds all units affected into 2 groups, an ally group and an enemy group.
Trigger:
  • Ability
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ability
    • Actions
      • Set temploc = (Target point of ability being cast)
      • Set AllyGroup = (Units within (300.00 + (50.00 x (Real((Level of Ability for (Triggering unit)))))) of (Center of (Playable map area)) matching (((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True))
      • Set EnemyGroup = (Units within (300.00 + (50.00 x (Real((Ability for (Triggering unit)))))) of (Center of (Playable map area)) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
      • Countdown Timer - Start Timer as a One-shot timer that will expire in 12.00 seconds
      • Custom script: RemoveLocation(udg_temploc)


This detects when a unit in any of the groups casts a spell, then does the effects. Move Speed Increase and Move Speed Decrease are abilities added to the affected units.
Trigger:
  • MS change
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in AllyGroup) Equal to True
        • Then - Actions
          • Unit - Add Move Speed Increase to (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in EnemyGroup) Equal to True
        • Then - Actions
          • Unit - Add Move Speed Decrease to (Triggering unit)
        • Else - Actions


This removes the units from the group after 12 seconds.
Trigger:
  • buff removal
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in AllyGroup and do (Actions)
        • Loop - Actions
          • Unit Group - Remove (Picked unit) from AllyGroup
      • Unit Group - Pick every unit in EnemyGroup and do (Actions)
        • Loop - Actions
          • Unit Group - Remove (Picked unit) from EnemyGroup
      • Custom script: DestroyGroup(udg_AllyGroup)
      • Custom script: DestroyGroup(udg_EnemyGroup)


The only known problem is that this isn't MUI.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top