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

Upgrading aura

Status
Not open for further replies.
Level 7
Joined
Jun 23, 2009
Messages
297
Well, the player has to pay a sum of gold, the aura has 4 levels, if its possible i want each level to be more expensive... I dont care mucho how the player buys the upgrade... weather its from a shop or from the tower it self...
 
Level 3
Joined
Aug 6, 2009
Messages
45
make a dummy research based on 'Iron forged swords' (that increases nothing) or something
give it to the tower then make the trigger:
  • Devotion Aura
    • Events
      • Unit - A unit Finishes research
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Triggering unit) Equal to <YourUnit>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of <YourAura> for (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Set level of <YourAura> for (Triggering unit) to 2
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of <YourAura> for (Triggering unit)) Equal to 2
            • Then - Actions
              • Unit - Set level of <YourAura> for (Triggering unit) to 3
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of <YourAura> for (Triggering unit)) Equal to 3
                • Then - Actions
                  • Unit - Set level of <YourAura> for (Triggering unit) to 4
                • Else - Actions

This is probably the harder way to do it and it would be easier to use variables
Also you'll have to make 4 dummy research spells, one for each rank (allowing you to increase cost.)

(Also replace the things in <> with your aura and unit.)

Sakuria x
 
Level 7
Joined
Jun 23, 2009
Messages
297
Thanks a lot Sakuria, but if its possible i want it to cost more and more gold each level... I thought to use variables, something like this:

  • Upgrading Aura
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Selling Unit)) Equal to <MyTower>
      • (Unit-type of (Sold unit)) Equal to <MyAura>
    • Actions
      • Set MyAuraLevel = (MyAuraLevel + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • asd Equal to 2
        • Then - Actions
          • Unit - Set level of <My Aura> for <My Tower> to 2
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • asd Equal to 3
            • Then - Actions
              • Unit - Set level of <My Aura> for <My Tower> to 3
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • asd Equal to 4
                • Then - Actions
                  • Unit - Set level of <My Aura> for <My Tower> to 4
                • Else - Actions


Is this ok?
 
Level 11
Joined
May 31, 2008
Messages
698
Instead of doin the If Then Else functions just use Unit - Increase level of <ability> for (Researching unit). And you have to make an upgrade in the object editor, but make it do nothing. Just change the icon and description to whatever you want. Also the gold cost is there. Initial gold cost is how much the first level will cost and gold cost increment is how much more gold it will be for the next level. Example: initial cost is 50 and increment is 20: 1st level costs 50, 2nd costs 70, 3rd costs 90, 4th costs 110.

EDIT:

I just looked in object editor under upgrades and there is an effect called "Ability level bonus". So you can just use that for the upgrade and then you wont even have to trigger anything. Im not sure what you have to put for the base and increment values, im guessing just put 1 for both of them. But im not sure if this will effect every unit with that ability, aka you might only have to rersearch it one time and then all units will have the aura upgraded. Not sure if thats what ur trying to accomplish.
 
Level 3
Joined
Aug 6, 2009
Messages
45
If you wanted it to cost mroe gold per level, make 4 dummy researches that lead on from each other, costing more per level.
This would still trigger the trigger i made and cost more gold per level.
 
Status
Not open for further replies.
Top