• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Rage for Warriors

Status
Not open for further replies.
Level 3
Joined
Jan 19, 2019
Messages
29
Hey there Hive folks I have been browsing some of the existing forums and haven't quite pegged the right thread or something that helped me more so with my map. In my map I am trying to get a rage system onto my warrior based spec heroes i have Fury/Arms and Protection I would like them to be capped at 150 Rage and regen 10 on hit gain 10 on auto attacking. Is there a specific way to do this where I can only change for warriors? Any help would be appreciated!
 
Level 38
Joined
Feb 27, 2007
Messages
4,951
If units with rage can acquire items that increase mana or mana regen, then this is a slightly harder problem to solve because you have to remove those bonus stats from the rage users. Adding 10 on attacked/attack is very easy with a damage detection system:
  • Events
    • Game - SomeDamageEventVariable becomes equal to 1.00
    • -------- usually they involve some event like this to know when damage happens --------
  • Conditions
  • Actions
    • If (All conditions) then (actions) else (actions)
      • If - Conditions
        • (DamagedUnit is in group Rage_Group) equal to true
      • Then - Actions
        • Unit - Set mana of DamagedUnit to (Current Mana of DamagedUnit + 10.00)
      • Else - Actions
    • If (All conditions) then (actions) else (actions)
      • If - Conditions
        • (DamagingUnit is in group Rage_Group) equal to true
      • Then - Actions
        • Unit - Set mana of DamagingUnit to (Current Mana of DamagingUnit + 10.00)
      • Else - Actions
 
Level 3
Joined
Jan 19, 2019
Messages
29
Not this smart sadly can't figure out this trigger in the slightest stuck after Events sadly...
 
Level 3
Joined
Jan 19, 2019
Messages
29
if.gif
(DamagedUnit is in group Rage_Group) equal to true
unit.gif
Unit - Set mana of DamagedUnit to (Current Mana of DamagedUnit + 10.00) . no idea how to find this
    • if.gif
      (DamagingUnit is in group Rage_Group) equal to true . i just make a unit group with the warriors in it in a separate trigger then use the variable?
And wont downloading that GUI remove all my existing triggers??? Or is there a way around this? thank you for the help btw!
 
Level 38
Joined
Feb 27, 2007
Messages
4,951
no idea how to find this
It's called Unit - Set Property. Also Unit - Property when you need to get its current mana. There might be an "add property" version but I don't think so, only for players.
i just make a unit group with the warriors in it in a separate trigger then use the variable?
Yes, you can just catch when the enter the map and add them automatically based on unit-type. If the warrior units are heroes that should never permanently die then you don't ever have to remove them from the group, but if there are warrior units that do permanently die you should remove them from the group when they do.

  • Events
    • Unit - A unit enters (Playable Map Area)
  • Conditions
    • Or - Any condition is true
      • (Unit type of (Triggering Unit)) equal to Warrior Type 1
      • (Unit type of (Triggering Unit)) equal to Warrior Type 2
      • (Unit type of (Triggering Unit)) equal to Warrior Type 3
  • Actions
    • Unit Group - Add (Triggering Unit) to Rage_Group
And wont downloading that GUI remove all my existing triggers??? Or is there a way around this? thank you for the help btw!
It's a demo map with the triggers in it. You can open it and copy the triggers into your map, as the systems' documentation show, and nothing will be deleted; even using the import/export triggers command doesn't overwrite all your previous triggers unless there's a name conflict, afaik. You can only copy 1 trigger at once, but you can move all the triggers into 1 category and then copy the whole category at once. Usually DDS systems require a Runed Bracers based ability in your map too, so make sure to read and copy such an ability if it exists.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
As Pyrogasm said, you'll need a damage detection system and most likely an indexing system. You should have these anyway, they're so important for making custom maps. I've been using Bribe's Unit Indexer and Damage Detection System in my maps and besides some issues with importing the systems over (like 1 or 2 variables bugging out and needing to be renamed/reset) it all works like a charm.

If you have issues importing the systems mentioned above I can help you along the way. They really aren't all that difficult to use once you get them up and running.

Here's an example of Bribe's Damage Event System in action. Once you have it imported, all you need to do is create a trigger with this event to detect whenever damage is dealt. If this is confusing than simply imagine that the event says "Whenever any unit is damaged".
  • Damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of DamageEventSource) Equal to Warrior
          • IsDamageSpell Equal to False
        • Then - Actions
          • -------- You can also track the rage using a real variable with an [array] --------
          • -------- Using a Unit Indexer system, each unit in the map has it's own unique custom value # --------
          • Set Rage[(Custom value of DamageEventSource)] = (Rage[(Custom value of DamageEventSource)] + 10.00)
          • -------- And/or if using mana, simply increase the mana --------
          • Unit - Set mana of DamageEventSource to ((Mana of DamageEventSource) + 10.00)
        • Else - Actions
The DamageEventSource is the source of the damage, so in this case it's your Warrior. With this system you can do just about anything. Like if you wanted to get really technical, you could add Rage equal to a percentage of the damage dealt. Like, set Rage = DamageEventAmount (how much damage was dealt) *0.10. So you gain 10% of the damage dealt as Rage. Also, in this example I check if the damage WASN'T from a spell (determining that it was instead an autoattack) with the boolean IsDamageSpell Equal to False.

--------------
Also, if you don't want to use mana to represent rage, you can display it in a couple of ways:
1) Display it in a multiboard.
2) Display it with floating text above the Warrior's head.
If you do it one of these ways then you'll have to store each Warrior's rage in a Real variable like I do in the example above.
 
Last edited:
Status
Not open for further replies.
Top