![]() |
![]() |
|||||||||||||||||
This is a simple script which adds a basic health system to the game. I made this mostly to get away from Sonic's ring system, but it could also be a resource for anyone working on a mod or character that would benefit from it.
![]() * Characters by default have 3 max HP. Health goes down by 1 every time the player gets hit, but no rings are spilled. The player dies when HP reaches 0. * Players can restore HP by hitting super ring monitors. HP is also restored at the beginning of each level. * Multiability characters have 1 less HP, characters with GlideAndClimb have 1 more HP. (E.G. Knuckles has 4, Sonic and Tails 3) Credits: Some code borrowed/modified from Tripel's Tails Guy wad. Download Now
Show Your Support
|
Comments |
![]() |
#2 |
Ya Gal Sal Here (σᴥσ)
Judge
|
Welcome to releases!
|
![]() |
![]() |
![]() |
#3 |
Meow Motherfuckers.
|
Omg, this is the regular and the simple health system that I waited for all the time!
Good job!
__________________
Check out my youtube channel: https://www.youtube.com/channel/UCd1...hUkNvNA93RPI8g |
![]() |
![]() |
![]() |
#4 |
The one and only!
|
Pretty neat but im not completely sold on losing all your rings on your final Health Point.
__________________
Done: Hit a 180° Rail shot 1st person to have a map in releases with Slopes |
![]() |
![]() |
![]() |
#5 |
Never Stop Running
|
Nice Wad. It gives me some challenge at harder bosses.
__________________
-Gotta go Fast! - Sanic Hegehog |
![]() |
![]() |
![]() |
#6 | |
Just call me Snu
|
This is a pretty neat Lua script, it might be better to remove the rings from the HUD so it wont confuse people thinking they'll live with 1 ring though.
__________________
Quote:
|
|
![]() |
![]() |
![]() |
#7 | |
I do things sometimes
|
Quote:
Rings are intact because they're still used for gaining extra lives. |
|
![]() |
![]() |
![]() |
#8 |
AKA Superjustinbros
|
The HP counter on the lower-left is simple, but it works.
It'll be fun to try out. |
![]() |
![]() |
![]() |
#9 |
Pyro the Hedgehog
|
How can I make this character-specific?
__________________
O kurwa! |
![]() |
![]() |
![]() |
#10 |
I do things sometimes
|
Pretty simple. There's a block of code in LUA_HP which defines a function called "calculate_hp_stat" -- this is responsible for giving characters their HP value. If you want to tweak it to work with one character, just replace lines 7-25 with this:
Code:
local function calculate_hp_stat(player) if not(player.mo) return(nil) elseif(player.pflags & PF_NIGHTSMODE) return(nil) elseif(player.mo.skin == "sonic") return(3) end end If you're curious: The code that you'd have just replaced there was mostly fluff to demonstrate how you can customize the HP values per character. That's of course only useful if you're making HP a broad mechanic. This replacement code keeps only some of the nil checks, which prevent the script from trying to give other objects health, or players health during NiGHTs special stages. The last elseif excludes any other character from using the function besides the one you've defined. I'm only explaining that because that code chunk in the WAD is rather minimally commented. Sorry about that. Last edited by CobaltBW; 06-09-2017 at 04:31 PM. |
![]() |
![]() |
![]() |
Thread Tools | |
|
|