• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Extra health / level

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,602
Hey,

I got a problem where I need help to solve.

I got an item that has a special thing: The Hero gains an additional 50 max Health when he levels up.

This doesn't work always.

Andenaj I BUG

Game Version 1.24e, Campaign Version 1.9d

It was working till LvL 3 (Giving 50 max HP every time Phodom LvLed up), but when i LvLed up to LvL 4 it started to give only 25 max HP, i also noticed that every time i LvLed up, since LvL 4, it created a "Tome of Health + 25HP" in the top of the map.


See the attached Screenshots


Suggestion to fix: Every time the character that is equipped with Andenaj LvL up it will creat a "Tome of Health" at the Hero location (Maybe the hero box), the tome will be bound to the Hero, like the Phodom, Fradz and Galeoths set pieces, only the the one who created it will be able to use it. Tomes should work like consumable itens, activates and gives the health after you click it (Andenaj I will creat a 50HP health tome, Andenaj II will creat a 75HP health tome and Andenaj III will creat a 100HP health tome).

I hope you can fix it, Andenaj is a great item to build strong heroes for late game, just like Francisca.

Edit: 26/05, now at chapter 5, same problem with Andenaj II, attached chapter 5 screenshot.

125851d1369434996-chosen-ones-1-9d-andenaj-1.jpg

125852d1369434996-chosen-ones-1-9d-andenaj-2.jpg

125971d1369616050-chosen-ones-1-9d-andenaj-ii.jpg


  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (TempUnit has an item of type Andenaj I) Equal to True
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempUnit is paused) Equal to True
        • Then - Actions
          • Unit - Unpause TempUnit
          • Hero - Create Manual of Health (+25) and give it to TempUnit
          • Hero - Create Manual of Health (+25) and give it to TempUnit
          • Unit - Pause TempUnit
        • Else - Actions
          • Hero - Create Manual of Health (+25) and give it to TempUnit
          • Hero - Create Manual of Health (+25) and give it to TempUnit
    • Else - Actions
So what could be the problem? How to fix this problem?
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Well, you have some of a problem not mostly in the trigger. You setted the added life to 50 when having the Manual of Health.

Now in your trigger you gave 2 of this items which makes it 100..... but it should be 50 right? I think you should just give 1 tome and not two of them.

ANd also you could have just make a custom Manual of Health that adds 100 HP all the way. ;l
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Level up by pressing ESC
Type any chat message to pause the unit, type any message to unpause the unit

  • Untitled Trigger 001
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • ((Triggering unit) has an item of type Claws of Attack +15) Equal to True
    • Actions
      • Unit - Add UnitMaxState - Life (+25) to (Triggering unit)
      • Unit - Increase level of UnitMaxState - Life (+25) for (Triggering unit)
      • Unit - Remove UnitMaxState - Life (+25) from (Triggering unit)

You can give the ability more levels and set the level accordingly to add different amounts of health.
 

Attachments

  • AddMaxHp.w3x
    13.6 KB · Views: 59
Level 37
Joined
Aug 14, 2006
Messages
7,602
Doomlord said:
Why are you checking if TempUnit is paused?
If unit is paused then I can't give him that item bonus.

Doomlord said:
Btw you could create a custom +50 hp tome instead of two +25 and also take that action out of the ITE since it will be executed whether the condition is met or not.
How many tomes I give doesn't matter I just try to save loading speed by just using one type of tome. ITE? What action?

Anyway, I think I found one thing that can cause the bug. If the hero is HEXED and then he gains next level. I wonder if there can be done a system that check if the hero actually gains the buff. If not then the bonus is given after a few second and then checked again?
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
I can't seem to level up a hero or give him exp if he is hexed, so I can't reproduce the problem.

The triggers could look like this.


  • Untitled Trigger 001
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • ((Triggering unit) has an item of type Claws of Attack +15) Equal to True
    • Actions
      • Set r = (Max life of (Triggering unit))
      • Unit - Add UnitMaxState - Life (+25) to (Triggering unit)
      • Unit - Increase level of UnitMaxState - Life (+25) for (Triggering unit)
      • Unit - Remove UnitMaxState - Life (+25) from (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Max life of (Triggering unit)) Not equal to (r + 25.00)
        • Then - Actions
          • Trigger - Turn on Untitled Trigger 004 <gen>
          • Unit Group - Add (Triggering unit) to g
        • Else - Actions
  • Untitled Trigger 004
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in g and do (Actions)
        • Loop - Actions
          • Set r = (Max life of (Picked unit))
          • Unit - Add UnitMaxState - Life (+25) to (Picked unit)
          • Unit - Increase level of UnitMaxState - Life (+25) for (Picked unit)
          • Unit - Remove UnitMaxState - Life (+25) from (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Max life of (Picked unit)) Equal to (r + 25.00)
            • Then - Actions
              • Unit Group - Remove (Picked unit) from g
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (g is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Game - Display to Player Group - Player 1 (Red) for 5.00 seconds the text: off
                • Else - Actions
            • Else - Actions
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
How many tomes I give doesn't matter I just try to save loading speed by just using one type of tome. ITE? What action.

Btw, the main thing about abilities taking loading time is text, so if you don't make the ability have tooltips it won't take much loading time. Number variables and handle IDs are all 32 bits, however, each sign in a string is also 32 bits. It seems that there is no optimization going on in there, so this makes the loading of strings(especially long ones) very slow.

I've done some benchmarks.
 
Status
Not open for further replies.
Top