Change amount of Skill Points?

Mapster

New Member
Reaction score
4
When your hero levels up, and you get 1 skill point by default, is there a way to change it so you get maybe 4?
I made a trigger that makes it so when your hero levels up you gain 3 skill points but if you level up twice at a time you still gain 3 points instead of 6.

Any ideas?

Cheers,
Mapster
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
Something like this?

Code:
Level Up
    Events
        Unit - A unit Gains a level
    Conditions
    Actions
        Hero - Modify unspent skill points of (Triggering unit): Add 2 points
 

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
this is basically Ghan's but modified


Code:
Level Up
    Events
        Unit - A unit Gains a level
    Conditions
    Actions
        Hero - Modify unspent skill points of (Triggering unit): Add 2 x (Level of (Triggering Unit))

I think that function exists :p
 

Mapster

New Member
Reaction score
4
Wouldn't that double the heroes level such as "hero levels to 8 from 6"
He gains 16 skill points!
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
> Wouldn't that double the heroes level such as "hero levels to 8 from 6"
He gains 16 skill points!

It wouldn't double the level of the hero, it gives double the hero's level in skill points.
 

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
wait wait.... you want some trigger that gives you 3 skill points every single time you level? or a trigger that gives you 3 skill points, then 6 skill points, then 9/12
 

Mapster

New Member
Reaction score
4
3 points per level, but if you somehow level twice in a row such as kill a monster that gave you so much experience that you level from say 3 to 5, that it gives you 3 points instead of 6, then you loose 3 points because you leveled twice instead of once.
 

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
oh.... wow....
Uhhh.... I think this would work, but it might lag like a beast
Code:
Events
   Every .1 sec of gametime
Cond
Actions
   pick every player in (all players)
       if Level of (Hero[Player Number of (picked Player)] is greater than Level[Player number of (picked player)] then
            add 2 x ((Level[Player Number of (picked Player)]) - (Level of Hero[Player Number of (Picked Player)]))
      set Level[Player Number of (Picked Player)] = Level of (Hero[(Player Number of (Picked PLayer))])

Hero would be a unit variable that is the Hero of the Player
Level would be set as a default value of 1

anyway that isn't the exact code, as I'm sure you know. I hope dictating the code didn't sound patronizing, I just wasn't sure how to write it out.
 
J

JJooKKoo

Guest
use one global that stores the hero level it my be array and the index is the owning player of the hero.So when a hero gains a level just add

(HeroLvl-HeroLvlGlobal) *3 skill points
and set HeroLvlGlobal to HeroLvl
 
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