• 🏆 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!

Add manna to transport unit per unit being transported.

Status
Not open for further replies.
Level 9
Joined
Mar 1, 2009
Messages
280
That's what i want this trigger to do add 50 manna to transporting unit per unit it is transporting.(4 total)

so here is the trigger i don't know how to do it proper sry.
_________________________________________________________________________________________________________________________
  • Data Storage Copy
    • Events
      • Unit - A unit Is loaded into a transport
    • Conditions
      • ((Unit-type of (Transporting unit)) Equal to Fencer (Guardian)) or (((Unit-type of (Transporting unit)) Equal to Crystalisk (Guardian)) or (((Unit-type of (Transporting unit)) Equal to Savant (guardian)) or (((Unit-type of (Transporting unit)) Equal to Marksman (Guardian)) or (((Unit-type of (Transporting unit)) Equal to Sen
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Transporting unit) has buff Bonus Manna (Guardian lvl 1)) Equal to False
          • ((Transporting unit) has buff Bonus Manna (Guardian lvl 2)) Equal to False
          • ((Transporting unit) has buff Bonus Manna (Guardian lvl 3)) Equal to False
          • ((Transporting unit) has buff Bonus Manna (Guardian lvl 4)) Equal to False
        • Then - Actions
          • Unit - Add +50 mana (guardian lvl 1) to (Transporting unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Transporting unit) has buff Bonus Manna (Guardian lvl 1)) Equal to True
            • Then - Actions
              • Unit - Remove +50 mana (guardian lvl 1) from (Transporting unit)
              • Unit - Add +100 mana (guardian lvl 2) to (Transporting unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Transporting unit) has buff Bonus Manna (Guardian lvl 2)) Equal to True
                • Then - Actions
                  • Unit - Remove +100 mana (guardian lvl 2) from (Casting unit)
                  • Unit - Add +150 mana (guardian lvl 3) to (Casting unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Transporting unit) has buff Bonus Manna (Guardian lvl 3)) Equal to True
                    • Then - Actions
                      • Unit - Remove +150 mana (guardian lvl 3) from (Casting unit)
                      • Unit - Add +200 mana (guardian lvl 4) to (Casting unit)
                    • Else - Actions
                      • Do nothing
____________________________________________________________________________________________________________________________________________
Right now all this does is add the first 50 manna but i want it to go up to 200 bonus manna.
I also want to eventually add bonus manna regen. Attack speed and damage in another trigger.
 
Last edited:
Level 4
Joined
Jul 25, 2014
Messages
57
Instead of a buff make an ability, which will add 0 mana on level 1, 50 mana on level 2 ....
And make the ability level increase with every loaded unit. Then make another trigger, which will remove that ability if the unit uses his unload ability.
 
Level 9
Joined
Mar 1, 2009
Messages
280
  • Data Storage lvl up
    • Events
      • Unit - A unit Is loaded into a transport
    • Conditions
      • ((Unit-type of (Transporting unit)) Equal to Fencer (Guardian)) or (((Unit-type of (Transporting unit)) Equal to Crystalisk (Guardian)) or (((Unit-type of (Transporting unit)) Equal to Savant (guardian)) or (((Unit-type of (Transporting unit)) Equal to Marksman (Guardian)) or (((Unit-type of (Transporting unit)) Equal to Sen
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Transporting unit) has buff Bonus Manna (Guardian lvl 1)) Equal to False
          • ((Transporting unit) has buff Bonus Manna (Guardian lvl 2)) Equal to False
          • ((Transporting unit) has buff Bonus Manna (Guardian lvl 3)) Equal to False
          • ((Transporting unit) has buff Bonus Manna (Guardian lvl 4)) Equal to False
        • Then - Actions
          • Unit - Increase level of +50 mana (guardian lvl 1) for (Transporting unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Transporting unit) has buff Bonus Manna (Guardian lvl 1)) Equal to True
            • Then - Actions
              • Unit - Increase level of +50 mana (guardian lvl 1) for (Transporting unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Transporting unit) has buff Bonus Manna (Guardian lvl 2)) Equal to True
                • Then - Actions
                  • Unit - Remove +100 mana (guardian lvl 2) from (Casting unit)
                  • Unit - Add +150 mana (guardian lvl 3) to (Casting unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Transporting unit) has buff Bonus Manna (Guardian lvl 3)) Equal to True
                    • Then - Actions
                      • Unit - Remove +150 mana (guardian lvl 3) from (Casting unit)
                      • Unit - Add +200 mana (guardian lvl 4) to (Casting unit)
                    • Else - Actions
                      • Do nothing
tried this didn't work didn't do any thing.
 
Level 9
Joined
Mar 1, 2009
Messages
280
thank you for your reply, but it didn't work, I just don't know what i am missing.

this is what i tried.
  • Data Storage lvl up
    • Events
      • Unit - A unit Is loaded into a transport
    • Conditions
      • ((Transporting unit) is loaded into (Transporting unit)) Equal to True
      • ((Unit-type of (Transporting unit)) Equal to Fencer (Guardian)) or (((Unit-type of (Transporting unit)) Equal to Crystalisk (Guardian)) or (((Unit-type of (Transporting unit)) Equal to Savant (guardian)) or (((Unit-type of (Transporting unit)) Equal to Marksman (Guardian)) or (((Unit-type of (Transporting unit)) Equal to Sen
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Bonus Manna (Guardian lvl 1)) Equal to False
          • ((Triggering unit) has buff Bonus Manna (Guardian lvl 2)) Equal to False
          • ((Triggering unit) has buff Bonus Manna (Guardian lvl 3)) Equal to False
          • ((Triggering unit) has buff Bonus Manna (Guardian lvl 4)) Equal to False
        • Then - Actions
          • Unit - Set level of +50 mana (guardian lvl 1) for (Transporting unit) to 1
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) has buff Bonus Manna (Guardian lvl 1)) Equal to True
            • Then - Actions
              • Unit - Set level of +50 mana (guardian lvl 1) for (Transporting unit) to 2
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Transporting unit) has buff Bonus Manna (Guardian lvl 2)) Equal to True
                • Then - Actions
                  • Unit - Remove +100 mana (guardian lvl 2) from (Casting unit)
                  • Unit - Add +150 mana (guardian lvl 3) to (Casting unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Transporting unit) has buff Bonus Manna (Guardian lvl 3)) Equal to True
                    • Then - Actions
                      • Unit - Remove +150 mana (guardian lvl 3) from (Casting unit)
                      • Unit - Add +200 mana (guardian lvl 4) to (Casting unit)
                    • Else - Actions
                      • Do nothing
Again this didn't work
 
Level 12
Joined
Oct 16, 2010
Messages
680
if u based "+50 mana (guardian lvl 1)" ability of item mana bonus (which i think u did)
then sadly it won't work since blizzard went lazy and programmed that(and also item hp bonus) spell poorly, resulting in what ever you set for levels above lvl1 won't take effect.

a better solution would be using a hashtable

when a unit is loaded do
set tempint = load current counter(integer) from hashtable
set tempint = tempint+1
if tempint == 1
add 50 mana
if tempint == 2
add 100 mana ---> separate ability from 50 mana bonus
.
.
.
after this
save tempint to hashtable

parent key can be handle of transporting unit
child key can be 0..
 
Status
Not open for further replies.
Top