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

Upgrade System like in Natures Wrath

Level 4
Joined
Dec 23, 2023
Messages
47
Hello, I am searching for the way to make an upgrade system like in Natures Wrath. Where you click a Button in Shop that belongs to the Ally that is controller by a Computer (or better triggers). I mean, I saw that it is a Building that is sold in Building, that it upgrades from.

But How do I make it, that it replaces the old one and build it as a new one. Which triggers do I need to search?
 
Level 20
Joined
Feb 27, 2019
Messages
593
I dont know what Natures Wrath is. What is it? When does this upgrade system occur in Natures Wrath?

"that it replaces the old one and build it as a new one"
What is "the old one" and what does "build it as a new one" mean?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,570
It sounds like you want to upgrade a unit, like a Scout Tower upgrades into a Guard Tower. Click on those in the Object Editor and see how it's done.

And there are Events to detect just about anything that happens in the game:
  • Events
    • Unit - A unit Finishes training a unit
    • Unit - A unit Finishes construction
    • Unit - A unit Finishes an upgrade
    • Unit - A unit Sells a unit
One of those would probably work for what you want. Then use the matching Event Responses. For example, the Event Response (Sold unit) goes with the A unit Sells a unit Event.
 
Level 4
Joined
Dec 23, 2023
Messages
47
I dont know what Natures Wrath is. What is it? When does this upgrade system occur in Natures Wrath?

"that it replaces the old one and build it as a new one"
What is "the old one" and what does "build it as a new one" mean?
I thought the Map is commonly know like Hero Line Wars and stuff. I talk about this Map: Download "Nature's Wrath" WC3 Map [Hero Defense & Survival] | newest version | 2 different versions available | Warcraft 3: Reforged - Map database

It sounds like you want to upgrade a unit, like a Scout Tower upgrades into a Guard Tower. Click on those in the Object Editor and see how it's done.

And there are Events to detect just about anything that happens in the game:
  • Events
    • Unit - A unit Finishes training a unit
    • Unit - A unit Finishes construction
    • Unit - A unit Finishes an upgrade
    • Unit - A unit Sells a unit
One of those would probably work for what you want. Then use the matching Event Responses. For example, the Event Response (Sold unit) goes with the A unit Sells a unit Event.
I have choosen the Unit sells a Unit Event. The Problem is, I don't know which triggers are the ones to take, to check, if the triggering building is Upgrader LvL 1 and sold Upgrader LvL 2.

I currently just track the seling unit event, but it would haüüen with any Unit.
It looks like this currently
  • Untitled Trigger 001
    • Events
      • Unit - Taverne 0072 <gen> Sells a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Sold unit) is A structure) Equal to Wahr
        • Then - Actions
          • Unit - Remove (Sold unit) from the game
          • Unit - Replace (Triggering unit) with a Tavern Upgrade using The old unit's relative life and mana
        • Else - Actions
I upload the maphere. I already used an uprotection tool, but sadly the Triggers aren't readable, at least without programming knowledge, so it sadly doesn't help me.
 

Attachments

  • Natures Wrath 1.4.w3m
    809.2 KB · Views: 1

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,570
It sounds like you need to learn the basics of the trigger editor. How about making a new map and working your way up instead of trying to work on an existing map that won't make any sense to you.

Anyway, instead of checking if your (Sold unit) is a Structure:
  • ((Sold unit) is A structure) Equal to Wahr
Check which Unit-Type it is:
  • (Unit-type of (Sold unit)) Equal to Footman
Again, these are basic concepts. Each Unit has a Unit-Type. A Unit is a specific individual.

So if you were to pick 1 of your 50 Footman you'd be picking ONE of those Units. But all 50 of those Units still share the same Unit-TYPE --> Footman.
 
Top