A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »Halo 2 style shield with health bar.

Author Topic: Halo 2 style shield with health bar. (8 messages, Page 1 of 1)
Moderators: Dennis

BioGoji1989
Joined: Dec 24, 2017

Professional Idiot


Posted: May 1, 2019 05:38 PM    Msg. 1 of 8       
In preparation for my next campaign mod, I'm looking for a Halo 2 style HUD that uses a health bar like what was seen in SPV1. Does anyone know where I can find the tags for this H2 styled shield with health bars? Because Halo CE doesn't have regenerating Health, so I need a health bar for whichever HUD I'm going to use.


DeadHamster
Joined: Jun 8, 2014

https://discord.gg/Neu4EJM


Posted: May 2, 2019 12:38 AM    Msg. 2 of 8       
Quote: --- Original message by: BioGoji1989
In preparation for my next campaign mod, I'm looking for a Halo 2 style HUD that uses a health bar like what was seen in SPV1. Does anyone know where I can find the tags for this H2 styled shield with health bars? Because Halo CE doesn't have regenerating Health, so I need a health bar for whichever HUD I'm going to use.


Make sure to tell TCK you love him





(script static unit player
(unit (list_get (players) 0))
)

(global real health_increment 0)

(script static real shield
(unit_get_shield (player))
)

(script static real health
(unit_get_health (player))
)

(script static real unchanged_shield
(* (shield) [your biped's shield strength])
)

(script static real health_number
(* (health) [your biped's health])
)

(script static real health_lost
(- [your biped's health] (health_number))
)

(script static void increase
(unit_set_current_vitality (player) (+ (health_number) health_increment) (unchanged_shield))
)

(script static real health_increment_set
(set health_increment (/ (health_lost) 20))
)

(script continuous health_recharge
(sleep_until (and (< (health) 1) (= (shield) 1)))
(health_increment_set)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
(sleep 15)
(increase)
)


sparky
Joined: Jun 27, 2009

Dismissal of Truth leaves one to believe lies


Posted: May 2, 2019 01:07 PM    Msg. 3 of 8       
Halo CE does have regenerating health... if I recall. Hint: try using negative numbers with damage effects.


BioGoji1989
Joined: Dec 24, 2017

Professional Idiot


Posted: May 3, 2019 12:23 AM    Msg. 4 of 8       
Quote: --- Original message by: sparky
Halo CE does have regenerating health... if I recall. Hint: try using negative numbers with damage effects.


Um... okay. However, I think that the scripting solution shown to me by DeadHamster might actually be the better solution, if only because I don't think the player should receive a health boost every time they get hit by an object... although getting a health increase every time you get hit by a vehicle would be absolutely hilarious when you remember how Halo 1's vehicle collision damage works by default.


SBB_Michelle
Joined: Nov 4, 2015

This site brings me pain.


Posted: May 3, 2019 06:49 PM    Msg. 5 of 8       
I guess you'd make a function on the biped(, make it clamp to ones), set it to shield in, and have an attachment that will dispatch damage effects on you with negative damage as long as your shields are full (>=1).
Edited by SBB_Michelle on May 3, 2019 at 06:50 PM


HandofGod
Joined: Jan 10, 2014

Halo Mac/MD Player & Modder


Posted: May 7, 2019 01:14 AM    Msg. 6 of 8       
Sounds like you're looking for a HUD rather than a script for health regeneration? There's one on here by p0larbear who did it in like 2007 for SPV1 I believe. Jesse also did a H2 HUD with a healthbar on Lockout and Turf... but those are protected maps :/


sparky
Joined: Jun 27, 2009

Dismissal of Truth leaves one to believe lies


Posted: May 7, 2019 06:21 AM    Msg. 7 of 8       
Quote: --- Original message by: SBB_Michelle

I guess you'd make a function on the biped(, make it clamp to ones), set it to shield in, and have an attachment that will dispatch damage effects on you with negative damage as long as your shields are full (>=1).
Edited by SBB_Michelle on May 3, 2019 at 06:50 PM


I think that by setting the damage flag to ignore shields, the HUD hit markers won't show up. I'm too busy to test it to refresh my memory.


BioGoji1989
Joined: Dec 24, 2017

Professional Idiot


Posted: May 14, 2019 02:14 PM    Msg. 8 of 8       
Quote: --- Original message by: sparky
Quote: --- Original message by: SBB_Michelle

I guess you'd make a function on the biped(, make it clamp to ones), set it to shield in, and have an attachment that will dispatch damage effects on you with negative damage as long as your shields are full (>=1).
Edited by SBB_Michelle on May 3, 2019 at 06:50 PM


I think that by setting the damage flag to ignore shields, the HUD hit markers won't show up. I'm too busy to test it to refresh my memory.


Well, either way, I got what I wanted by deprotecting an SPV1 map with Refinery and using recursive extraction for the health and shield tags. I do appreciate all of the help given to me by everyone, however.

 

 
Previous Older Thread    Next newer Thread







Time: Thu August 22, 2019 2:38 AM 172 ms.
A Halo Maps Website