Scripts / New skull health hud with lua

Author
Message
gd
8
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 15th Sep 2016 18:55 Edited at: 17th Sep 2016 11:05
Hi all, I just wanted to share this new health HUD for anybody who is making a game for this HALLOWEEN.

It is based on CR4CK3T script which is here:-
[GER] [ENG] Modern Hud

I just added new skull icons and text.

The lua script is below and the HUD images are attached in a zip. Just extract the zip images into a folder called skull_hud in the scriptbank image folder and copy the lua script skul_hud.lua to your scriptbank root directory. Just add to your game in the same way you would other scripts to be always active. Take a look at the images below for in-game example.









That's about it.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Air cooled

Laptop - M17xR3

Attachments

Login to view attachments
PM
TazMan
GameGuru TGC Backer
14
Years of Service
User Offline
Joined: 20th Jan 2011
Location: Worldwide Web
Posted: 16th Sep 2016 11:36
This looks great, what a good idea for Halloween.
HP Pavilion Laptop - AMD A8-4555M APU with Radeon(tm) HD Graphics - 1.6GHz, 8GB Memory, Windows 10 Home, 64-bit Operating System.

I've got something to say - It's better to burn out than fade away.
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 16th Sep 2016 22:04
Hey nice one gd!
Thanks 4 sharing.
I'm curious how it work 4 you, having a typo here: " elseif hud_on == 1then ", you can notice in your Code Snippet, all "then" statement is blue colored, except that line.

I have compacted the "function ShowMeHuds(e)" code:



Shortly and easier to add more pics if you want.

3com

Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
gd
8
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 17th Sep 2016 11:24 Edited at: 17th Sep 2016 12:24
Thanks guys,

@3com - never even noticed that lol. Updated in the code above. Still worked tho.
Quote: "@3com - Shortly and easier to add more pics if you want."
That is ture
Thanks for the code update, but I would have to start the counter at 0 not 1 for the first image to load on screen

local counter = 0

Also on another note - I'm not sure that GIF's work in GG so I added five flaming skull PNG's in a loop using a timer. This will then switch on after the health hits -75%. It works well but I need to add more PNG images for the loop to be more smother. The idea is to do away the the normal HUD's and numbers and make it become visible based on health degrading. The skull will start to burn increase the flames intensity the more you die. Maybe even have no lives just have the skull burning and changing colour based on how many lives you have left.

Have a looking in the images below. I have added a few so you can see the PNG's changing like a animated GIF.




Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Air cooled

Laptop - M17xR3

Attachments

Login to view attachments
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 17th Sep 2016 15:06
Create a gif is possible in GG, I did it with a diamond months ago, as you mention, you need a lot of pictures, so that the animation is smooth.

Quote: "The idea is to do away the the normal HUD's and numbers and make it become visible based on health degrading. The skull will start to burn increase the flames intensity the more you die. Maybe even have no lives just have the skull burning and changing colour based on how many lives you have left."


I like the idea.

I have used blood, however the idea of fire is good.

I always forget that the picture numbering starts with 000.



3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
AceRimmer
Reviewed GameGuru on Steam
10
Years of Service
User Offline
Joined: 28th Feb 2015
Playing: classic British heavy metal mostly
Posted: 17th Sep 2016 19:38
this works really well, many thanks
gd
8
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 17th Sep 2016 20:06 Edited at: 17th Sep 2016 20:18
Hi 3com, I liked your vid. Here is a look at my first test. I have used an old EVE online you-tube account for this so sorry for the logo overlay on the right hand skull lol.

https://www.youtube.com/embed/do6fWBOCffI

Using an old laptop so the fps is very low, but I'm sure your get the idea. Plus packing the desktop in my suitcase while I'm away is not the best idea either lol

Edit:-

Just added the link so the eve logo is not on top of the right hand skull.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Air cooled

Laptop - M17xR3
PM
gd
8
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 17th Sep 2016 20:12
HI AceRimmer, thanks and you are welcome
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Air cooled

Laptop - M17xR3
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 17th Sep 2016 20:42
Quote: "Using an old laptop so the fps is very low,"

Ya! same problem here.
Nice vid bytheway.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
gd
8
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 19th Sep 2016 15:49 Edited at: 20th Sep 2016 15:09
Hi guys, just made some more HUD images that could be use with the above script or your own.

The images are for a sci-fi games, but could be use for what ever you want. The dimension are W: 201 x H: 642 in PNG format. Just shrink the images down to your game specs.

Some ideas would be to use it for health / shields and or a menu screen to select areas of the body to upgrade, etc.

You could even have the health numbers in the middle of the body... its all up to you.

Example of images in zip.



Small video of the images and how they were made to work.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Air cooled

Laptop - M17xR3

Attachments

Login to view attachments
PM
gd
8
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 20th Sep 2016 13:58 Edited at: 20th Sep 2016 14:36
Hi all, this is a SCI-FI HUD I have been working on which is based on the above health sprites I added. This may give you an idea of how to use them.

Have a look at the images below.



In-game example - The below image is not a game I have made. It is just an example image I found on the net without a hud.



Without the background image



gd Ed.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Air cooled

Laptop - M17xR3

Attachments

Login to view attachments
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 20th Sep 2016 14:35
Very nice work GD, looks great.

Just wondering, is it possible to adapt this script for horizontal instead of vertical? Ie the health draining from right to left instead of top to bottom?


p.s. just noticed your locaton, Hellfire Caves? really? I live not too far from there myself, spent quite a few nights in those caves, i've also spent quite a few nights sitting vigil in the grave yard next to the Dashwood memorial

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
gd
8
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 20th Sep 2016 14:41 Edited at: 20th Sep 2016 15:11
Hi Belidos, yes sort of lol. What I mean is its the graphic not the script that changes. So just make the images horizontal and change the locations to match. I did it here:-

Help with HUD relocations

Edit:
I have also just added the you tube video of it working.

I'm not at the cave now but just love them and the ones in Castleton, Derbyshire.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Air cooled

Laptop - M17xR3
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 20th Sep 2016 15:17
Ah yeah now you say about changing the images it makes perfect sense, for some reason i was thinking of it along the lines of some of the bars i've tried where it moves a sprite along the bar, whereas yours use multiple sprites to simulate the movement

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
gd
8
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 20th Sep 2016 15:30 Edited at: 9th Jan 2017 19:40
@Belidos

Cool - I have many days like that lol
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 SLI mode, Water cooled with an old Victorian cast iron radiator and a industrial leather belt driven fan - That's what you call Steampunked.

Laptop - M17xR3


A new competition running for GG
PM

Login to post a reply

Server time is: 2025-04-22 23:02:38
Your offset time is: 2025-04-22 23:02:38