Set Hero Level

the Lumpy

►►►
Reaction score
53
I tried to make a trigger where I could type a command and a number to change the level of my hero, but I'm having some problems.

  • If I type any number less than or equal to 6,000 it sets it to that.
  • If I type any number greater than 6,000 it either stays the same or goes up to 3,754.
(The maximum hero level for my map is set to 10,000 in the game constants)

Here is my trigger:
Code:
Set Level
    Events
        Player - Player 1 (Red) types a chat message containing 'level  as A substring
        Player - Player 2 (Blue) types a chat message containing 'level  as A substring
        Player - Player 3 (Teal) types a chat message containing 'level  as A substring
    Conditions
    Actions
        Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to (Triggering player)
                                ((Owner of (Picked unit)) is in DMs) Equal to False
                    Then - Actions
                        Hero - Set (Picked unit) Hero-level to (Integer((Substring((Entered chat string), 8, (Length of (Entered chat string)))))), Show level-up graphics
                    Else - Actions

Any ideas? :confused:
Help is appreciated. :)
 
M

Master_Saji

Guest
-__-

Zis is quite ze intresting zing...I vill zee vhat I can do for you...

:nuts:
 

Rad

...
Reaction score
228
You pick all units owned by triggering player, then check if owner is triggering player OR is in 'dm', so pretty much if the unit is in 'dm' it doesnt do crap! Other than that it looks fine...

Zis is quite ze intresting zing...I vill zee vhat I can do for you...
You sound like that crazy proffesor guy off Cokers Bad Fur Day :D
 
M

Master_Saji

Guest
Holy crap this is complicated! I would wait for some of the more...advanced mappers to get on lol

sorry I couldn't help though
 

the Lumpy

►►►
Reaction score
53
No, it works like this:

if . . .
the picked unit belongs to me (triggering player)
-OR-
the picked unit belongs to someone not in DMs
 

Rad

...
Reaction score
228
Code:
Level Up
    Events
        Player - Player 1 (Red) types a chat message containing 'Level  as A substring
    Conditions
        (Length of (Entered chat string)) Greater than or equal to 8
    Actions
        Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Playable map area) contains (Picked unit)) Equal to True
                    Then - Actions
                        Hero - Set (Picked unit) Hero-level to (Integer((Substring((Entered chat string), 8, (Length of (Entered chat string)))))), Show level-up graphics
                    Else - Actions
                        Do nothing
 
M

Master_Saji

Guest
Actually...both of those would work...and actually, Rad is right about nothing else being wrong...and that trigger should work Rad lol


and yes, it is ze dokter from ze Conker's Bad Fur day

still :nuts:
 

the Lumpy

►►►
Reaction score
53
I know that the trigger works, but I'm trying to figure out why the level is getting set all weird.

Thanks for trying to help.
 

Rad

...
Reaction score
228
Never had a bug like that, you win the Abstract Bugz Skill award for the year! w00t
 
H

Heptameron

Guest
There's an XP limit as well as a level limit, only the XP limit can't be changed. If you post the amount of XP the Hero has when it hits whatever level it is, I bet it'll be a power of two, like a good computer number.
 
T

team.ism

Guest
I just tried it.

I got:

Level: 3754
EXP: 704825856 / 705156096

Those exp numbers aren't max hex numbers like I would suspect, but oh well.
 
H

Heptameron

Guest
team.ism said:
Those exp numbers aren't max hex numbers like I would suspect, but oh well.
Yeah, that doesn't seem to be a power of two. Oh well, arbitrary choice then...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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