Tutorial Simple Upgrade Troops Triggers

Jack.K

New Member
Reaction score
1
HERO WARS - UPGRADING YOUR TROOPS​
By Jack.K​

Hello, This is the way I create the upgrade troops function like you see in Hero Wars. This may not be the best way to create this but it works.

Your going to need:

A trigger to control buying the upgrade.
A unit that your men will upgrade to.
A unit to train as the upgrade (I'll explain in a moment)

Go into your object editor and make a new custom unit. Make the base anything and call it something like "Upgrade Troops" Now go through all the stats and change the Resource side of things. Make sure to change the food down to 0.

Now create your unit to be produced. I just made a custom footman and changed his stats down. (Eg. Health and Damage)

Now just add the "Upgrade Troops" unit to a building under units trained.

Triggers:

Ok..Now for the trigger part.
First create a new trigger called "Control" or something. The trigger should be as follows:

Trigger:
  • Event
    • Unit - (Your Unit) Finishes training a unit
This just means that when the building finishes training something start the trigger.

Trigger:
  • Condition
    • (Unit-Type of (Trained Unit)) Equal to (Your Upgrade Unit)

This means that only do the actions if these are true. So don't continue unless the Trained Unit is you Upgrade Unit

Trigger:
  • Action
    • Unit - Remove (trained unit) from the game.
Now under here you would put a command which Turns On another trigger which would have all the spawn properties in. Then after that command put:
That way you won't see the "Upgrade Troops unit come out of the building"


Followup Trigger:

For the Attacking trigger (This would be for the herowars part) Just put:

Trigger:
  • Event
    • Time - Every (Your Time) seconds of game time
    • Actions
    • Unit - Create (Number of Units)(Your Unit) at (Your Region)
    • Unit - Order (Last Created Unit) to attack move to (Enemy Region)


Now the trigger above would be turned off on a trigger initalized at the start of the game so it only comes on when the ability has been baught.

Thanks for reading. If you have any questions feel free to ask.
Jack
 

Jack.K

New Member
Reaction score
1
So has anyone found this useful? Or has any one found an easy way to accomplish this?
 

wraithseeker

Tired.
Reaction score
122
I think this thing is just too simple for a tutorial, you should add in more stuff and there are memory leaks.

Show them more ways? Other then using that method?
 

GooS

Azrael
Reaction score
154
Hmm, I was going to say why not use upgrades but then I realized that this can upgrade health and manapool, range, damage, well everything all in one so this seems like the way to do it.

But as said, go through leaks and put an example map attached to the thread.

//==GooS
 

UndeadDragon

Super Moderator
Reaction score
447
It might look nicer if you use the [noparse]
Trigger:
[/noparse] tags aswell.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
It really doesn't have the length or content-depth to be marked as a tutorial.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top