creep leveling system

helpmeplease

New Member
Reaction score
7
Hi..
My map has a system in it where a hero levels up and so do all the creeps. but the problem is its an orpg. so creeps will quickly become however many people are in the game x stronger than players. (not wat i want) so is there a condition to check if the leveling unit is the highest in the game?
like, say a hero levels up then stops leveling for awhile and other players keep leveling. the one with the fastest leveling will set the creep level. how would i do this?
 

Fallen-Kid

New Member
Reaction score
12
Well i remember that groups leak, but I'm sure you can take out the leaks and modify this trigger to your needs. This is just something to get you started.

Trigger:
  • Creep Level
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Owner of (Triggering unit)) Not equal to Player 12 (Brown)
      • (Level of (Triggering unit)) Equal to CreepLevel
    • Actions
      • Set CreepLevel = (CreepLevel + 1)
      • Unit Group - Pick every unit in (Units owned by Player 12 (Brown)) and do (Hero - Set (Picked unit) Hero-level to CreepLevel, Hide level-up graphics)
 

HydraRancher

Truth begins in lies
Reaction score
197
To check a heroes level you have to compare it with all the others. Something like this:
Trigger:
  • Trigger
    • Events
      • Whatever - Something happens
    • Conditions
      • Whatever - Something has to be true/false
    • Actions
      • Set HighestLevel = 0
      • For each (Integer A) from 1 to Number_Of_Heroes do (Actions)
        • Loop - Actions
          • If (All Conditions are true) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HeroLevel[(Integer A)] is Greater than (>) HighestLevel
            • Then - Actions
              • Set HighestLevel = HeroLevel[(Integer A)]
            • Else - Actions
      • Game - Display text to (All Players) The highest level is + HighestLevel + .


You'll have to track the heroes levels throughout the game, and save it into HeroLevel[Array]
 

helpmeplease

New Member
Reaction score
7
To check a heroes level you have to compare it with all the others. Something like this:
Trigger:
  • Trigger
    • Events
      • Whatever - Something happens
    • Conditions
      • Whatever - Something has to be true/false
    • Actions
      • Set HighestLevel = 0
      • For each (Integer A) from 1 to Number_Of_Heroes do (Actions)
        • Loop - Actions
          • If (All Conditions are true) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HeroLevel[(Integer A)] is Greater than (>) HighestLevel
            • Then - Actions
              • Set HighestLevel = HeroLevel[(Integer A)]
            • Else - Actions
      • Game - Display text to (All Players) The highest level is + HighestLevel + .


You'll have to track the heroes levels throughout the game, and save it into HeroLevel[Array]

What will I have to do??
 

helpmeplease

New Member
Reaction score
7
Trigger:
  • events
    • unit - A unit gains a level
    • conditions
      • and - all (condtions) are true
        • conditions
          • ((triggering unit)) equal to creeplevel
          • (level of (triggering unit)) equal to creeplevel
    • actions
      • set creeplevel = (creeplevel + 1)
      • unit group - pick every unit in creeps and do (player - set the current research level of creep upgrade to (creeplevel) + 1) for player 12 (Brown))


is there any easy way to do this or do i have to type it all?
 

HydraRancher

Truth begins in lies
Reaction score
197
can he just use the max function?

There's a max function?

Try this:

Trigger:
  • Trigger
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set HighestLevel = 0
      • For each (Integer A) from 1 to Number_Of_Heroes do (Actions)
        • Loop - Actions
          • If (All Conditions are true) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HeroLevel[(Integer A)] is Greater than (>) HighestLevel
            • Then - Actions
              • Set HighestLevel = HeroLevel[(Integer A)]
            • Else - Actions
      • Set CreepsLevel = HighestLevel
      • Player - Set the current research level of creep upgrade to (CreepsLevel + 1) for Player 12 (Brown)

Warning: Every player must have only 1 hero. Number_Of_Heroes is the ammount of players who have heroes.
 

Seprest

New Member
Reaction score
15
HeroLevel = integer array
HighestLevel = integer
CreepsLevel = integer


those are the variables o_O


the trigger the OP posted runs through all the heroes the players have, it sets the HighestLevel integer to whatever the highest hero's level is. Update the HeroLevel array every time a hero gains a level, or the player gets a hero. OP also sais each player must have only 1 hero.
 

Seprest

New Member
Reaction score
15
OP = overhead poster, the poster above me or w/e that I am referencing.


Number of heros is just the # of players that have heros on the map, it is used in the above loop to limit the for each loop. the op said...

"Warning: Every player must have only 1 hero. Number_Of_Heroes is the ammount of players who have heroes."


I suggest you just keep track of each hero in a unit group and run a for each loop through it and check which unit has the highest level:

Trigger:
  • If - Conditions
    • PickedUnit's level > Highest Level
    • Then - Actions
      • Set HighestLevel = PickedUnit's level
    • Else - Actions


Put something like that in the for each loop running through the unit group of heroes
Sorry for freehand


copy the stuff in this thread and make a patchwork of it into the trigger you want.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top