Snippet Rage - Attacking for mana

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
Hello, another snippet =) , I am not sure if there has been one released for Rage.

What is rage?

Rage is from WoW (don't groan) and is when your attacked or you attack your mana goes up. Instead of mana going up over time it goes down, meaning to use your abilities you better deal some hard damage to an enemy unit. Now i havn't (AT THE MOMENT) created a trigger where you could have multiple different types of units but from this snippet you can edit it to your pleasure =)

IMPORTANT - You must set the mana regeneration on the hero to a minus number, to do this hold down shift and click on the cell or edit your preferences. Reccomended settings is -0.5 or -0.25.

Triggers

Double Triggers - At the moment for one here, you can created more variables.

Code:
Rage Double 1
    Events
        Map initialization
    Conditions
    Actions
        Set Rage_Unit = Blademaster 0000 <gen>


Rage Double 2
    Events
        Unit - A unit Is attacked
    Conditions
         Multiple ConditionsOr - Any (Conditions) are true
            Conditions
                (Attacked unit) Equal to (==) Rage_Unit
                (Attacking unit) Equal to (==) Rage_Unit
    Actions
        Unit - Set mana of Rage_Unit to ((Mana of Rage_Unit) + 5.00)

Simple, easy and fast. You can change this so the unit gains rage if it is only attacked or if it only attacks.

Trigger 2 - Single

Code:
Rage Single
    Events
        Unit - A unit Is attacked
    Conditions
    Actions
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Attacked unit)) Equal to (==) Blademaster
            Then - Actions
                Unit - Set mana of (Attacked unit) to ((Mana of (Attacked unit)) + 5.00)
            Else - Actions
                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of (Attacking unit)) Equal to (==) Blademaster
                    Then - Actions
                        Unit - Set mana of (Attacking unit) to ((Mana of (Attacking unit)) + 5.00)
                    Else - Actions

If/Then/Else, i love them =). Pratically self explanatory. Had to do it this way so triggering unit event responce would not get mixed up...


These triggers HAVE been tested and do work. But you may need to edit the values to find your specific needs furfilled.

This is todays Snippet

~~~Duderock101~~~
 

Draphoelix

It's not the wintercold that's killing me
Reaction score
132
Mana only goes down when the hero is out of combat I believe in WoW. You should make a timer to decrease mana when the unit haven't attacked in x time, through a trigger. Though this rage thingy has already been made.

Edit: And maybe put a damage detection thingy too to make it work more accurate? And maybe put a demo map so people could copy paste it from the map.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
you should better use damage detection
this is how I did rage stuff on my map:

Code:
rage set
e: unit enters playable map area
c: 
a: add to rage gain the event triggering unit takes damage


Code:
rage gain
e:
c: unit type of damage source equal to (some "warrior" hero)
a: set mana of damage source to (mana of damage source) + (damage taken x 0.50) / (level of damage source))
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top