• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Solved] Autocast Fire Shield spell

Status
Not open for further replies.
  • FS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fire Shield
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is in FS_Group.) Equal to False
        • Then - Actions
          • Unit - Add Permanent Immolation (Fire Shield) to (Target unit of ability being cast)
          • Unit Group - Add (Target unit of ability being cast) to FS_Group
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (FS Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on FS Loop <gen>
        • Else - Actions
  • FS Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FS_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Fire Shield) Equal to False
            • Then - Actions
              • Unit - Remove Permanent Immolation (Fire Shield) from (Picked unit)
              • Unit Group - Remove (Picked unit) from FS_Group.
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in FS_Group) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
-FS_Loop should be set to Initially OFF (Uncheck Initially On in the Trigger Editor).
-Fire Shield is based on Bloodlust with it's bonuses set to 0%.
-Permanent Immolation (Fire Shield) is based on Permanent Immolation (obviously).
-FS_Group is a Unit Group variable.
 
  • FS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fire Shield
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is in FS_Group.) Equal to False
        • Then - Actions
          • Unit - Add Permanent Immolation (Fire Shield) to (Target unit of ability being cast)
          • Unit Group - Add (Target unit of ability being cast) to FS_Group
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (FS Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on FS Loop <gen>
        • Else - Actions
  • FS Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FS_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Fire Shield) Equal to False
            • Then - Actions
              • Unit - Remove Permanent Immolation (Fire Shield) from (Picked unit)
              • Unit Group - Remove (Picked unit) from FS_Group.
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in FS_Group) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
-FS_Loop should be set to Initially OFF (Uncheck Initially On in the Trigger Editor).
-Fire Shield is based on Bloodlust with it's bonuses set to 0%.
-Permanent Immolation (Fire Shield) is based on Permanent Immolation (obviously).
-FS_Group is a Unit Group variable.

Thanks, that worked on the test (although for some reason it failed to add the ability once o.O). One question though, can I hide the immolation ability icon?
 
Yes, just set the button position of the ability to:
X=0
Y=-11
To enter negative values hold shift while opening the field.

Now, there are hiccups. When I start the test game and cast the ability, sometimes it doesn't apply to ability (usually during the first cast). When I moved the ability to -11, it didn't start damaging nearby units.

EDIT: in the latest test, the first cast was successful then the subsequent ones removed the ability from any further buffed unit even though the buff was still on them. When I moved my units, further buffing worked.
 
  • Fireshield
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Fire Shield
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is in FS_Group) Equal to False
        • Then - Actions
          • Unit - Add Burn (Neutral Hostile 2) to (Target unit of ability being cast)
          • Unit Group - Add (Target unit of ability being cast) to FS_Group
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Remove Fireshield <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Remove Fireshield <gen>
        • Else - Actions
  • Remove Fireshield
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FS_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Fire Shield ) Equal to False
            • Then - Actions
              • Unit - Remove Burn (Neutral Hostile 2) from (Picked unit)
              • Unit Group - Remove (Picked unit) from FS_Group
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in FS_Group) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
 
  • FS Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FS_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Fire Shield) Equal to False
            • Then - Actions
              • Unit - Remove Permanent Immolation (Fire Shield) from (Picked unit)
              • Unit Group - Remove (Picked unit) from FS_Group.
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in FS_Group) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
Wouldn't be better have the condition to off the trigger outside of that unit group function?, because that function will run for every unit in that group instead of 1 time.
 
Wouldn't be better have the condition to off the trigger outside of that unit group function?, because that function will run for every unit in that group instead of 1 time.
Yeah, you could move it to the outside as well, I usually put it out there.

@WarCortez
Move the If Then Else that runs after a unit is removed to OUTSIDE of the Pick every Unit function.
 
Like this?

  • Remove Fireshield
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FS_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Fire Shield ) Equal to False
            • Then - Actions
              • Unit - Remove Burn (Neutral Hostile 2) from (Picked unit)
              • Unit Group - Remove (Picked unit) from FS_Group
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FS_Group) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Like this?

  • Remove Fireshield
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FS_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Fire Shield ) Equal to False
            • Then - Actions
              • Unit - Remove Burn (Neutral Hostile 2) from (Picked unit)
              • Unit Group - Remove (Picked unit) from FS_Group
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FS_Group) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
Yes
 
Status
Not open for further replies.
Back
Top