• 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.

[Trigger] Spell - Are their any issues with this spell.

Status
Not open for further replies.
Level 7
Joined
Aug 5, 2010
Messages
147
I made a custom immolation like spell, spent several hours debugging and fixing it, want to know if their is anything i missed, the ability works fine ingame.

The spell is similar to immolation but the damage dealt is increased whenever the hero that has it is attacked and the damage will eventually go back down to 0 if the unit isnt getting attacked
  • Spell Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Immolating Chaos --------
      • Set Immo_Amount[1] = 5.00
      • Set Immo_Amount[2] = 10.00
      • Set Immo_Amount[3] = 20.00
      • Set Immo_Amount[4] = 40.00
      • Set Immo_Amount[5] = 80.00
      • Set Immo_Amount[6] = 160.00
      • Set Immo_Amount[7] = 320.00
      • Set Immo_Amount[8] = 640.00
      • Set Immo_Amount[9] = 1280.00
      • Set Immo_Amount[10] = 2560.00
  • Immo Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Immolating Chaos [Passive]
    • Actions
      • Set Immo_Hero = (Learning Hero)
      • Trigger - Turn on Immo Add <gen>
      • Trigger - Turn on Immo Damage <gen>
      • Trigger - Turn off (This trigger)
  • Immo Add
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacked unit)) Equal to Chaos Revenant [Str]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Immo_Stacks Less than or equal to 10
        • Then - Actions
          • Set Immo_Stacks = (Immo_Stacks + 1)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Immo_Stacks Greater than or equal to 11
        • Then - Actions
          • Set Immo_Stacks = 10
        • Else - Actions
  • Immo Damage
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Immo_Point = (Position of Immo_Hero)
      • Set Immo_Group = (Units within 200.00 of Immo_Point matching (((Matching unit) belongs to an enemy of (Owner of Immo_Hero)) Equal to True))
      • Set Immo_Damage = (Immo_Amount[(Level of Immolating Chaos [Passive] for Immo_Hero)] x (Real(Immo_Stacks)))
      • Unit Group - Pick every unit in Immo_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is Magic Immune) Equal to False
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Unit - Cause Immo_Hero to damage (Picked unit), dealing Immo_Damage damage of attack type Spells and damage type Normal
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Immo_Stacks Greater than or equal to 1
        • Then - Actions
          • Set Immo_Stacks = (Immo_Stacks - 1)
        • Else - Actions
          • Do nothing
      • Set Immo_Damage = 0.00
      • Custom script: call DestroyGroup(udg_Immo_Group)
      • Custom script: call RemoveLocation(udg_Immo_Point)
I copied all the triggers/units/abilitys over to a new map so i could debug it better, its attached to this post.

One last thing, i attempted to make it so the unit with the ability gains a buff that keeps track of the Immo_Stacks so the player can see what their current stacks are, ive seen this done in Enfo TS maps so i know its possible i just couldnt figure out how to do it, so do i do this?
 

Attachments

  • TestMap.w3x
    20.6 KB · Views: 22
  • Someone can abuse the "A unit is Attacked" event for it fires as soon as the animation swing starts. I recommend using a DDS and using an "On damage" event
  • There's no point of Do Nothing functions. Just leave it empty
  • You can change the If/Then/Else in Immo Add to just this:
    • Immo Add
      • Events
        • Unit - A unit Is attacked
      • Conditions
        • (Unit-type of (Attacked unit)) Equal to Chaos Revenant [Str]
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Immo_Stacks Less than 10
          • Then - Actions
            • Set Immo_Stacks = (Immo_Stacks + 1)
          • Else - Actions
  • It seems you never turn this trigger off. I didn't read the description of your ability, but what are you trying to achieve with this passive?
 
Level 7
Joined
Aug 5, 2010
Messages
147
  • Someone can abuse the "A unit is Attacked" event for it fires as soon as the animation swing starts. I recommend using a DDS and using an "On damage" event
  • There's no point of Do Nothing functions. Just leave it empty
  • You can change the If/Then/Else in Immo Add to just this:
    • Immo Add
      • Events
        • Unit - A unit Is attacked
      • Conditions
        • (Unit-type of (Attacked unit)) Equal to Chaos Revenant [Str]
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Immo_Stacks Less than 10
          • Then - Actions
            • Set Immo_Stacks = (Immo_Stacks + 1)
          • Else - Actions
  • It seems you never turn this trigger off. I didn't read the description of your ability, but what are you trying to achieve with this passive?

Heres the description from the map

"Surrounds the hero in a cloak of chaotic flames that deals damage to nearby enemy units, when the hero is attacked the amount of damage dealt will increase, this damage will decrease when not being attacked."

When the hero is attacked the amount of damage dealt will increase, this effect stacks 10 times, the 1st if/then/else action adds a stack if Immo_Stacks is less than 10, the 2nd if/then/else action sets Immo_Stacks to 10 if it ever goes to 11.

I dont really want to add a DDS to the map, so i modified the trigger so only units that are enemys of Immo_Hero will only trigger the actions.

The do nothing functions were remants from debugging.

  • Immo Add
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacked unit)) Equal to Chaos Revenant [Str]
      • ((Attacking unit) belongs to an enemy of (Owner of Immo_Hero)) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Immo_Stacks Less than 10
        • Then - Actions
          • Set Immo_Stacks = (Immo_Stacks + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Immo_Stacks Greater than or equal to 11
        • Then - Actions
          • Set Immo_Stacks = 10
        • Else - Actions
 
Last edited:
When the hero is attacked the amount of damage dealt will increase, this effect stacks 10 times, the 1st if/then/else action adds a stack if Immo_Stacks is less than 10, the 2nd if/then/else action sets Immo_Stacks to 10 if it ever goes to 11.
What's the reasoning behind not wanting to use my If/Then/Else? Your setup will constantly reset the stacks to 10 while mine will only increment it if Immo_Stacks is >= 9 while only needing one If/Then/Else.

I dont really want to add a DDS to the map, so i modified the trigger so only units that are enemys of Immo_Hero will only trigger the actions.
I think you missed what I said. Players can abuse the "A unit is Attacked" event by ordering an attack and stopping. They can reach max stacks in around 2 seconds just by doing this. Why wouldn't you even want to use a DDS? They're extremely powerful and easy to use.
 
Level 7
Joined
Aug 5, 2010
Messages
147
What's the reasoning behind not wanting to use my If/Then/Else? Your setup will constantly reset the stacks to 10 while mine will only increment it if Immo_Stacks is >= 9 while only needing one If/Then/Else.


I think you missed what I said. Players can abuse the "A unit is Attacked" event by ordering an attack and stopping. They can reach max stacks in around 2 seconds just by doing this. Why wouldn't you even want to use a DDS? They're extremely powerful and easy to use.

I just tested your if/then/else and it is in fact better, the reasoning behind my way was because i needed 10 stacks, but it was always going to 11, so i made an action that sets the stacks to 10 if it ever goes to 11, but you method gets rid of that completely so thanks.

Players cant really abuse the trigger since most of the enemy units that attack them are AI controlled and they cant trigger it with their own units or allied/friendly units,, the only player controlled units that can activate it are enemy heros and whatever summoned units they have, so the players "abusing" it would just be killing themselves, plus most people arnt even going to realize how it works.

I dont how long im going to be working on this map, i started it in 2014 then i stopped, i decided to start working on it again and i dont know how long this is going to last. Im not saying im never going to use one, ive used Brides DDS in the past and the results were fantastic, i just dont want to implement something to only use it in one thing, if i ever need to use a DDS to do something ill use Brides and just change this or any other trigger. I know its sloppy and i probably shouldnt do it like this but this map may never even see the light of day.
 
Status
Not open for further replies.
Top