Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Max Hp Not Working
Max Hp Not Working
Dec 2 2008, 1:00 am
By: strupan  

Dec 2 2008, 1:00 am strupan Post #1



I have this in trigger

CONDITIONS:
Current Player has suffered exactly 1 deaths of protoss Zealot.
Current Player brings exactly 2 Prisoner to 'max HP'.
ACTIONS:
Remove 1 Level at 'max HP'.
Modify death counts for Current Player: Set to 2 for Protoss Zealot.
Set hit points for All [men] owned by Current Player at 'Anywhere' to 12%
Preserve trigger.

CONDITIONS:
Current Player has suffered exactly 2 deaths of protoss Zealot.
Current Player brings exactly 2 Prisoner to 'max HP'.
ACTIONS:
Remove 1 Level at 'max HP'.
Modify death counts for Current Player: Set to 3 for Protoss Zealot.
Set hit points for All [men] owned by Current Player at 'Anywhere' to 18%
Preserve trigger.

But when I move two Level(Civilians) to Location 'max HP', it changes my units to 100%

What did I do wrong?



None.

Dec 2 2008, 1:06 am SelfPossessed Post #2



I'm assuming you copied these triggers until you hit 100%. As in, a trigger for exactly 3 deaths, another for exactly 4, so on and so forth.

I'm not exactly sure what Level does, but my guess would be that after the first trigger executes, it will satisfy the conditions for the second, all the way until the last one that sets hp to 100%. Take the two triggers you posted. The top one will execute for when Zealot deaths are 1. Then it sets deaths to 2 and hp to 12%. That satisfied the conditions for the second trigger, which in the same trigger cycle sets deaths to 3 and hp to 18%. This will happen until you hit 100%

The easiest way to fix it would be to reverse the order. As in, the first trigger sets it to 100%, the second to 94%, the third to 88%, etc. This will prevent one trigger from executing the next one in the same trigger cycle.

EDIT:
You may also want to move the two civilians from max hp somewhere in the actions.



None.

Dec 2 2008, 1:09 am Roy Post #3

An artist's depiction of an Extended Unit Death

I'm guessing that you have another trigger overriding this one. Check for maybe a "test" trigger or an extra trigger that would be setting the HP to 100%.

I'm assuming that your Protoss Zealot deaths are your level counter.
Perhaps you could explain why your condition is to bring "2 Prisoner" and the action is to remove "1 Level." It looks like the conditions would always be met unless you move a prisoner, because you aren't (re)moving/changing the conditions to stop executing after the conditions are met.




Dec 2 2008, 2:15 am NudeRaider Post #4

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

When you post triggers you should really explain what they are doing.
I don't know where to start - I just don't know what exactly you're trying to do.

I will just post a generic max HP trigger set in the hope you can find your mistake if you have something to compare with:

Trigger: Heal 10% on level 1
Player Force
Conditions:
Current Player brings at least 1 [men] to 'heal'
Current Player brings exactly 1 death of <UNUSED unit>
Actions:
Set HP of All Units of Current Player at 'heal' to 10%
Preserve

Trigger: Heal 20% on level 2
Player Force
Conditions:
Current Player brings at least 1 [men] to 'heal'
Current Player brings exactly 2 death of <UNUSED unit>
Actions:
Set HP of All Units of Current Player at 'heal' to 20%
Preserve

... etc. for all Levels
An then:

Trigger: Set Level
Player Force
Conditions:
Current Player brings at least 1 Civ to 'max HP +'
Current Player has suffered at most 9 deaths of <UNUSED unit>
Actions:
Kill 1 Civ at 'max HP +' for Current Player
Set deaths Add 1 death of <UNUSED unit> for Current Player
Preserve

<UNUSED unit> can be any unit that is not appearing in the map. A good one would be Neutral - Neutral - Cantina. Rename it to 'HP LEVEL'.

As a variation you could create actual units somewhere instead of raising a death count. Looks less professional but the player can easily see his HP Level.

Another modification that you seemed to try would be to heal the unit upon level up. But this needs 1 Levelup trigger for each level, instead of 1 Levelup trigger total.

Trigger: Set Level 2 and heal
Player Force
Conditions:
Current Player brings at least 1 Civ to 'max HP +'
Current Player has suffered exactly 1 deaths of <UNUSED unit>
Actions:
Kill 1 Civ at 'max HP +' for Current Player
Set deaths Add 1 death of <UNUSED unit> for Current Player
Set HP of All Units of Current Player at 'anywhere' to 20%
Preserve

Trigger: Set Level 3 and heal
Player Force
Conditions:
Current Player brings at least 1 Civ to 'max HP +'
Current Player has suffered exactly 2 deaths of <UNUSED unit>
Actions:
Kill 1 Civ at 'max HP +' for Current Player
Set deaths Add 1 death of <UNUSED unit> for Current Player
Set HP of All Units of Current Player at 'anywhere' to 30%
Preserve

... etc. for all levels




Dec 2 2008, 3:15 am strupan Post #5



Going to delete all 17 of the trigger and remaking it with your trigger then, thanks again NudeRaider



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:09 pm]
Ultraviolet -- let's fucking go on a madmen rage bruh
[10:01 pm]
Vrael -- Alright fucks its time for cake and violence
[2024-5-07. : 7:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
Please log in to shout.


Members Online: DiearAnother, Oh_Man