change unit when he kills an enemy

You're better off going with the custom value option. An example trigger of this would be:
Trigger:
  • unit kills unit
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Unit - Set the custom value of (Killing unit) to ((Custom value of (Killing unit)) + 1)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Custom value of (Killing unit)) Equal to (==) 10
          • Then - Actions
            • Unit - Replace (Killing unit) with a Footman using The old unit's relative life and mana
          • Else - Actions
            • Do nothing

You can add your own conditions if you only want it to work for a certain type of unit, or only a specific unit, etc. This trigger can be copied to make the killing unit upgrade multiple levels, all using the custom value of the unit.

Hope this helps :D
 
Why are you even considering an Array? It is only MPI.

Use Custom Values/Hastabes/Some other count with ability levels or mana.

Otherwise, using an Array each player can only have a single unit thats leveling up.

Use the suggested method above.
It is the simplest and most effective.

However, if you are already using Custom Values for something else. Then perhaps a hashtable would be better.

---

EDIT: lol. i was too lazy to read it before post. Apologies, um then your array has all the units contained in it. Personally I wouldn't advise that, especially if you do not know what you are doing.
 
Just some additional info.

Check out on the ability called Chaos in the Object Editor. Use this ability to morph in favour of the trigger 'Replace unit'.
 
i'd like it to be automathic, so i don't have to click every unit that kills X units, that's why i want it this way... so could anyone quote me the trigger, i just don't idea from where to start :S
Huh?
Give it an ability that adds a point to it each time it kills something (Think Necromastery from DoTA's Nevermore).
When that ability reaches X points, change the unit and reset the ability to 0, or keep adding.
 
You're better off going with the custom value option. An example trigger of this would be:
Trigger:
  • unit kills unit
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Unit - Set the custom value of (Killing unit) to ((Custom value of (Killing unit)) + 1)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Custom value of (Killing unit)) Equal to (==) 10
          • Then - Actions
            • Unit - Replace (Killing unit) with a Footman using The old unit's relative life and mana
          • Else - Actions
            • Do nothing

You can add your own conditions if you only want it to work for a certain type of unit, or only a specific unit, etc. This trigger can be copied to make the killing unit upgrade multiple levels, all using the custom value of the unit.

Hope this helps :D

i can't find this triggers:
(Custom value of (Killing unit)) Equal to (==) 10
unit kills unit
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)

:S
 
1). Custom Value comparisons go under Integer Comparison conditions.
2). Unit kills unit is the name of the trigger, not an action.
3). That's an If/Then/Else, Multiple Functions action.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top