Simple - HP on Level up

DoomedDude

New Member
Reaction score
1
I'm back with another problem :D
I want my hero to get hp equal to his STR on level up. I don't want a STR increase.
I thought I could use tomes, the only problem is, how can I give the hero amount of tomes equal to it's STR.
Other possibilities are welcome too, but nothing too complicated please.
 

zxczxzczx

New Member
Reaction score
2
create a tome which increases hp by 1 and for integer 1 to (str of hero) give tome to leveling hero.

im not sure if that would leak or cause massive lag (unless you have 100000000 str?)
 

jackall

You can change this now in User CP.
Reaction score
37
tomes do cause leaks because their model remains where they are picked up thus taking up a part of memory also their SFX's arent distroyed, a good way would be creating tomes without model and SFX
 

jackall

You can change this now in User CP.
Reaction score
37
not just the model, also the "Art - Target" field in that tome's ability
 

tooltiperror

Super Moderator
Reaction score
231
OR.

Make an item that does it, and force him to use it.

But not a tome.
 

zxczxzczx

New Member
Reaction score
2
make an item (either from claws or rings) then just change the model to blank ang the "automatically use when acquired". and change the ability models to blank together with the arts and animations. i think that blank wont leak, would it?

btw, also change the charge to 1 and perishable to true
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
It won't be so good but make every unit with 5000 life (or whatever you need to be the highest value) and set with triggers
1<Z<8190
Set unit[1,2,3,4.....] the unit that has
MaxHP[1,2,3,4....] as the "Base" max hp of a certain unit.
Then you have to use this

every 0.3 seconds
...
for every [Integer A] from 1 to Z
loop actions
IF life of unit[Integer A] becomes greater than (MaxHP[Integer A]+(STR[include bonuses]xY) of unit[Integer A])], THEN [set unit[Integer A] hp to (MaxHP[Integer A]+(STR[include bonuses]xY) of unit[Integer A])], ELSE (Do nothing)

Then, because you won't see exactly his hp--->

A unit is attacked
Attacked unit is Hero equal to true
Floating text: show overhead of attacked unit (attacked unit's current hp)
Floating text: (last created text) Disable permanece
Floating text: Set (last created text) age to 0.3 seconds
 

Rllulium

New Member
Reaction score
10
Hmm, I actually made a trigger that grants a unit increased max health on every kill yesterday. For now I need to get moving to work, but I can post it when I get home; modified to your purposes.
It should with all due respect be more effective than using tomes, since it is based of a number of invisible abilities and few If fuctions.
 

DoomedDude

New Member
Reaction score
1
To jomik: I tried that system, but I need the HP to go up to 20000, and I think that system can't do it, and I didn't understand it really well..
I'll try using nonmodel tomes or something like that, but first trying that trigger Rllulium will hopefully post :D
 

jackall

You can change this now in User CP.
Reaction score
37
heh... i made you a simple map for the strength gaining, be sure to add events for heroes that are/were/will (be) placed in the editor so that they too will "give" heroes strength
 

Attachments

  • give str for attacks.w3x
    16.6 KB · Views: 148

HydraRancher

Truth begins in lies
Reaction score
197
I have an idea you use 1 and keep doubling, you can make any number equal to the last value doubled -1. Example:
1,2,4,8,16,32,64,128 can make all the numbers up to 255 (256-1)

The only problem is I dunno how to make sure it adds the right tomes for the right ammount of strength.
 

DoomedDude

New Member
Reaction score
1
Uhh you didn't read my post, did ya? :D
The point is, I want the hero to receive HP depending on its STR on level up, not the STR to increase at all. Like giving a tome of HP for every 3str unit has, and that could be one solution but i can't find how to give many items at once, maybe with some harder triggering using integers or such?
If unit has 10str on level up, he gets 30HP etc.
I haven't decided the numbers yet but you get my point (hopefully >.<)
 

Rllulium

New Member
Reaction score
10
Well, here I go. I am sorry that this isn't perfect at the moment, but it is a pointer until I get to finish it. The most glaring flaws are that it is not currently MUI and that it can not yet give as much as 20000 health. It will also give the unit more health for every level it has previously gained if it's Strength is increased. I do not know if that matters.
You'll need one ability for every multiple of two needed to get the health wanted. In the example, I have 5 abilities, allowing a meek 1+2+4+8+16=31. These abilities can be based of any item ability that gives health.

Trigger:
  • Feed
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • ((Leveling Unit) is a Hero) Equal to True
    • Actions
      • Set HealthTarget = (Leveling unit)
      • Set HealthLevelUp = (HealthLevelUp + 1)
      • Set HealthLevel = HealthLevelUp * (Strength of HealthTarget (Include bonuses))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HealthLevel Greater than or equal to (16 * (Strength of HealthTarget (Include bonuses)))
        • Then - Actions
          • Unit - Add Health(binary 4) to HealthTarget
          • Set HealthLevel = (HealthLevel - (16 * (Strength of HealthTarget (Include bonuses))))
        • Else - Actions
          • Unit - Remove Health(binary 4) from HealthTarget
        • If - Conditions
          • HealthLevel Greater than or equal to (8 * (Strength of HealthTarget (Include bonuses)))
        • Then - Actions
          • Unit - Add Health(binary 3) to HealthTarget
          • Set HealthLevel = (HealthLevel - (8 * (Strength of HealthTarget (Include bonuses))))
        • Else - Actions
          • Unit - Remove Health(binary 3) from HealthTarget
        • If - Conditions
          • HealthLevel Greater than or equal to (4 * (Strength of HealthTarget (Include bonuses)))
        • Then - Actions
          • Unit - Add Health(binary 2) to HealthTarget
          • Set HealthLevel = (HealthLevel - (4 * (Strength of HealthTarget (Include bonuses))))
        • Else - Actions
          • Unit - Remove Health(binary 2) from HealthTarget
        • If - Conditions
          • HealthLevel Greater than or equal to (2 * (Strength of HealthTarget (Include bonuses)))
        • Then - Actions
          • Unit - Add Health(binary 1) to HealthTarget
          • Set HealthLevel = (HealthLevel - (2 * (Strength of HealthTarget (Include bonuses))))
        • Else - Actions
          • Unit - Remove Health(binary 1) from HealthTarget
        • If - Conditions
          • HealthLevel Greater than or equal to (1 * (Strength of HealthTarget (Include bonuses)))
        • Then - Actions
          • Unit - Add Health(binary 0) to HealthTarget
          • Set HealthLevel = (HealthLevel - (1 * (Strength of HealthTarget (Include bonuses))))
        • Else - Actions
          • Unit - Remove Health(binary 0) from HealthTarget
 

DoomedDude

New Member
Reaction score
1
Well, that wasn't really what I needed :S
This is what I did :p
Trigger:
  • Skillpoints
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • Set LevelingHero = (Leveling Hero)
      • Hero - Modify unspent skill points of LevelingHero: Add 2 points
      • Set LevelHP = (Real((Strength of LevelingHero (Exclude bonuses))))
      • For each (Integer A) from 1 to 1000, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • LevelHP Greater than or equal to 1.00
            • Then - Actions
              • Hero - Create LevelHP and give it to LevelingHero
              • Set LevelHP = (LevelHP - 1.00)
            • Else - Actions
              • Skip remaining actions

And it works, just tell me if there are leaks?
 

Rllulium

New Member
Reaction score
10
Well, that wasn't really what I needed :S
This is what I did :p
Trigger:
  • Skillpoints
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • Set LevelingHero = (Leveling Hero)
      • Hero - Modify unspent skill points of LevelingHero: Add 2 points
      • Set LevelHP = (Real((Strength of LevelingHero (Exclude bonuses))))
      • For each (Integer A) from 1 to 1000, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • LevelHP Greater than or equal to 1.00
            • Then - Actions
              • Hero - Create LevelHP and give it to LevelingHero
              • Set LevelHP = (LevelHP - 1.00)
            • Else - Actions
              • Skip remaining actions

And it works, just tell me if there are leaks?

I'll let you know that this trigger does not really do anything that different then the one I posted. I can understand if the limitations I mentioned puts you off, but if you want it I can fix those.

About your current trigger:
Why are you converting the heros Strength to Real? It seems completely meaningless in the trigger you posted and if you do not, you can run the loop with "each (Integer A) from 1 to LevelHP" instead.
Also, this trigger cannot be run by players that have a full inventory (quite obviously). I don't know if that is a problem. What kind of map is this?
 

DoomedDude

New Member
Reaction score
1
It's an RPG.
I plan of having fully customized inventory with mostly variables, and heroes will probably have only 4 slots for useable items.
But the inventory is full thing... Doesn't matter, just tested, hero will still gain more max HP even if inventory full. Tomes are instantly used anyway, so it doesn't matter, luckily. :rolleyes:
And I did this trigger because it seemed more simple than yours, no offense.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
The system I wrote you works. The limits are 8190 units and 99999999999 base max hp. And the problem is because the green bar that shows the remaining hp will be too small. I though a floating text Showing current hp is not a bad idea to solve the problem. try using it. Its bugless
 
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