Staredit Network

Staredit Network -> UMS Assistance -> Reducing Unit Hp,shield, Energy Using Triggers
Report, edit, etc...Posted by Screwed on 2004-08-06 at 14:51:50
Is is possible to reduce a unit's HP,Shield, Energy using triggers and not only setting their health percentage?

Example:
Can you do an action that does: Add 50 Hp to 2 marine in location.

Thanks People!
Report, edit, etc...Posted by Staredit.Net Essence on 2004-08-06 at 14:53:41
Make a zerglin attack or a medic appear...
Report, edit, etc...Posted by Kenoli on 2004-08-06 at 14:54:27
Im not sure, but i think i saw somthing about adding amounts of life to units in the map making tricks & help section, try looking there
Report, edit, etc...Posted by Sama- on 2004-08-06 at 14:56:12
you know you could always look their urself!!! and if you onl want them to heal 50 health points you could always find out what % of their life that is.... its all math really
Report, edit, etc...Posted by BeeR_KeG on 2004-08-06 at 14:57:01
With triggers you can only set HP%.
You can do what Sessase said attack it or heal it.
Don't Forget Shield Battery.
Report, edit, etc...Posted by Sama- on 2004-08-06 at 14:59:33
im pretty sure you can set unit hp... subtract unit hp... and add unit hp... so that way you can damage if you know the %

uhhh... how does kenoli have 103 posts a day and only 7 posts??
Report, edit, etc...Posted by Kenoli on 2004-08-06 at 15:00:01
I dont know of any way to detect how much life a unit has. (or shields or energy or resources etc etc)
Report, edit, etc...Posted by Sama- on 2004-08-06 at 15:02:02
kenoli you have 8 posts and then it says u have 115 posts per day... some glitch??
Report, edit, etc...Posted by CheeZe on 2004-08-06 at 15:04:16
QUOTE(Kenoli @ Aug 6 2004, 02:00 PM)
I dont know of any way to detect how much life a unit has. (or shields or energy or resources etc etc)

detecting resources is easy

detecting shield is a very painful process (same thing as hp, but more difficult)

detecting hp is liket his: have a unit go through a place where it would be dealt 1 damage (or whatever you want..the higher, the more you would have to "round"). each time it deals 1 damage, add 1 score to something (or anything similar to this). after the unit dies, you will know how much hp is on it and you can create an identical copy of it. or do other things to it, like add a certain amount of hp with the set %.

if you want to simply lower or raise the hp, use medic or attack it (only once!)
Report, edit, etc...Posted by Kenoli on 2004-08-06 at 15:09:28
i think its using my amount of posts vs number of days, and it hasnt been a full day yet so it may be throwing it off.

I guess you could find out a unit's life that way, but it could take a while. And that way dosent seem very useful, sounds like alot of room for error too
Report, edit, etc...Posted by Screwed on 2004-08-06 at 15:09:41
O thanx people! ^_^
Guess I'm just thinking of impossible things.. pinch.gif (to do them with triggers)
Report, edit, etc...Posted by PickleWeezle(U) on 2004-08-06 at 18:35:52
QUOTE(Screwed @ Aug 6 2004, 01:51 PM)
Is is possible to reduce a unit's HP,Shield, Energy using triggers and not only setting their health percentage?

Example:
Can you do an action that does: Add 50 Hp to 2 marine in location.

Thanks People!

"Modify Unit Hit Points"
"Modify Unit Energy"

As for adding 50 hp, you can do it once you figure out the percentages. However, you can't add more then the unit(s) have maximum with triggers. There's no other way to do it by triggers.
Report, edit, etc...Posted by Tuxedo Templar on 2004-08-06 at 18:57:44
Me and many others have tried for ages to find ways to handle HP beyond % limitations, and the closest thing possible is to represent their HP in some "virtual" way, like with burrowed stacked units underneath them, player ownership (ala Trigger Happy D), or setting it to 1 hp and reviving it upon death as long as its HP counter (gas, mins, custom score, unit deaths, etc.) is non-zero. I think there are other ways but nothing will get you exactly the effect you want, I'm afraid.
Report, edit, etc...Posted by Screwed on 2004-08-06 at 20:27:41
QUOTE(PickleWeezle(U) @ Aug 6 2004, 05:35 PM)
QUOTE(Screwed @ Aug 6 2004, 01:51 PM)
Is is possible to reduce a unit's HP,Shield, Energy using triggers and not only setting their health percentage?

Example:
Can you do an action that does: Add 50 Hp to 2 marine in location.

Thanks People!

"Modify Unit Hit Points"
"Modify Unit Energy"

As for adding 50 hp, you can do it once you figure out the percentages. However, you can't add more then the unit(s) have maximum with triggers. There's no other way to do it by triggers.

Can you add health percentages? I thought you can only set them.. maybe i wasn't watching.

Doesn't it say:
Modify Unit Hit Points: Set to 50%.

Can the 'Set to ' be replaced by 'add' ?
Report, edit, etc...Posted by EruIluvatar on 2004-08-06 at 21:01:00
No it can't. After lke 6 years of sc, i think someone would've figured that out by now.
Report, edit, etc...Posted by .Coko[CK] on 2004-08-07 at 12:32:02
The only chance is to try writing some code into StarForge and seeing what results appear, by changing the Set, to an Add. Likely you will have no effect, but its worth a try.

The reason for having no effect is that Starcraft has no way to understand the trigger, since the triggers in question are just an easy way to represent some difficult engine decisions for Starcraft (i won't go any further into this...) and therefore if the designers of the Engine haven't implemented the code to follow a module created by a trigger, then it will just be ignored, will not work or anything.

[A long way of saying No, it can't be Add]
Report, edit, etc...Posted by Lexmarkz32 on 2004-08-07 at 12:37:33
If you want simple math you could just make the unit's life 100, or 1000, where 1 percent of life = 1 dmg, or 10 dmg.
Report, edit, etc...Posted by Screwed on 2004-08-07 at 14:19:34
QUOTE(Lexmarkz32 @ Aug 7 2004, 11:37 AM)
If you want simple math you could just make the unit's life 100, or 1000, where 1 percent of life = 1 dmg, or 10 dmg.

Bah.. i know this lexmark, i was asking if there was a trigger to add the health instead of setting it and it has been answered. Thanks!
Report, edit, etc...Posted by Staredit.Net Essence on 2004-08-07 at 14:21:45
1 idea could be...

create a medic, make is "magic" at 1% at each 1 sec, soo... if you want 10 more hp, remove the medic at 10 sec...
Report, edit, etc...Posted by Stereo on 2004-08-07 at 14:35:41
pinch.gif but it also gains, and 1% is 2 mana. You'd be better off just giving it 4% once and leaving it for the same amount of time.
Next Page (1)