Focus Fire

Igor_Z

You can change this now in User CP.
Reaction score
61
I made a spell on my riffleman hero that does exactly the same things that the Winrunner's Focus Fire spell does. I based my Riffle Rage spell on Soulburn in order to put a buff on the target. I based the Riffle Rage (Self Cast) on Unholy Frenzy which the dummy uses on my hero in order to do the buff check...

Here is the description:
The Sharpshooter channels wind throughout his riffle to surge an excess of adrenaline, giving him maximum attack speed when firing on the targeted enemy. Damage is reduced in this state by 50/40/30%.

Triggers:

Trigger:
  • RR Damage Detection
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set RR_Groups[1] = (Units in (Playable map area))
      • Unit Group - Pick every unit in RR_Groups[1] and do (Actions)
        • Loop - Actions
          • Trigger - Add to RR Damage Being Dealt <gen> the event (Unit - (Picked unit) Takes damage)
          • Unit Group - Add (Picked unit) to RR_Groups[2]
      • Custom script: call DestroyGroup(udg_RR_Groups[1])
      • Custom script: call DestroyTrigger(gg_trg_RR_Damage_Detection)


Trigger:
  • RR Damage Detection 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is in RR_Groups[2]) Equal to False
    • Actions
      • Unit Group - Add (Triggering unit) to RR_Groups[2]
      • Trigger - Add to RR Damage Being Dealt <gen> the event (Unit - (Triggering unit) Takes damage)


Trigger:
  • RR Casting
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Riffle Rage
    • Actions
      • Set RR_Caster = (Triggering unit)
      • Set RR_Target = (Target unit of ability being cast)
      • Set RR_Point = (Position of RR_Target)
      • Unit - Add Spell Book (Riffle Rage) to RR_Caster
      • Unit - Create 1 Riffle Rage Dummy for (Owner of RR_Caster) at RR_Point facing Default building facing degrees
      • Set RR_Dummy = (Last created unit)
      • Unit - Add Riffle Rage (Self Cast) to RR_Dummy
      • Unit - Set level of Riffle Rage (Self Cast) for RR_Dummy to (Level of Riffle Rage for RR_Caster)
      • Unit - Order RR_Dummy to Undead Necromancer - Unholy Frenzy RR_Caster
      • Unit - Add a 1.00 second Generic expiration timer to RR_Dummy
      • Unit - Grant shared vision of RR_Target to (Owner of RR_Caster)
      • Wait 0.03 seconds
      • Unit - Order RR_Caster to Attack RR_Target
      • Trigger - Turn on RR Remove Buff <gen>


Trigger:
  • RR Damage Being Dealt
    • Events
    • Conditions
      • (Level of Riffle Rage for (Damage source)) Greater than 0
      • ((Damage source) has buff Riffle Rage (Caster)) Equal to True
      • ((Triggering unit) belongs to an ally of (Owner of (Damage source))) Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to RR_Target
          • ((Triggering unit) has buff Riffle Rage (Target)) Equal to True
        • Then - Actions
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Damage taken) x (0.60 - (0.10 x (Real((Level of Riffle Rage for (Damage source))))))))
        • Else - Actions
          • Unit - Remove Spell Book (Riffle Rage) from RR_Caster
          • Unit - Remove Riffle Rage (Caster) buff from RR_Caster
          • Unit - Remove Riffle Rage (Target) buff from RR_Target
          • Unit - Deny shared vision of RR_Target to (Owner of RR_Caster)
          • Custom script: call RemoveLocation(udg_RR_Point)
          • Trigger - Turn off RR Remove Buff <gen>


Trigger:
  • RR Remove Buff
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (((RR_Caster is dead) Equal to True) or ((RR_Target is dead) Equal to True)) or (((RR_Caster has buff Riffle Rage (Caster)) Equal to False) or ((RR_Target has buff Riffle Rage (Target)) Equal to False))
        • Then - Actions
          • Unit - Remove Spell Book (Riffle Rage) from RR_Caster
          • Unit - Remove Riffle Rage (Caster) buff from RR_Caster
          • Unit - Remove Riffle Rage (Target) buff from RR_Target
          • Unit - Deny shared vision of RR_Target to (Owner of RR_Caster)
          • Custom script: call RemoveLocation(udg_RR_Point)
          • Trigger - Turn off (This trigger)
        • Else - Actions


The spell works like it is suppose to but I am concerned... Will it work all the time I cast it because that "Wait" action gives me nightmares. So the real question here is:
"Is there a more efficient way to do this in GUI"...

P.S: I don't like it in MUI
Thank you for your time
 

Kling[o]

New Member
Reaction score
7
Why you don't like MUI? you could make a timer of 0.03 second... then you make a trigger that will run when it expire
 

Igor_Z

You can change this now in User CP.
Reaction score
61
So will something go wrong if I leave the wait in that trigger?
 

tommerbob

Minecraft. :D
Reaction score
110
Why don't you just set the target unit to a variable, and then check whenever the caster deals damage or attacks, and if his target is not the variable, remove the buff from the caster? Seems like this should be really easy.

And yes, waits are buggy. Especially with smalls ones like "wait 0.03 seconds". If I understand correctly, anything under about 1 second will be not be totally accurate. Don't use waits if you can afford it.
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Thank you both of you for the replies. I fixed it with a timer
 

Dyslexia://

New Member
Reaction score
13
2dkioia3.gif


...
Or you can base the ability off of Berserk to add the atk spd [this ability is given to the hero], then...
you can make a Roar with negative atk dmg values and just make a dummy unit cast it around your hero/unit/whatever, then just force atk that one unit...
unless you want to make it so that it only gets the atk spd boost when it targets that one unit AND its able to target other units, but thats still much more easier to use and modify than triggering the damage dealt
 

Igor_Z

You can change this now in User CP.
Reaction score
61
The spell is good as it is. There is always room for improvement, but often the triggers are the ones that need modification... I think I thought of a good idea on how the spell should work. Just that order action gave me some problems.
 
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