Scripts / Small issue with level sswitching and a script i'm using.

Author
Message
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 25th Jun 2016 11:22
In my new work in progress I'm customizing the HUDS using a script smallg wrote, and it looks good so far:



However, I have encountered a small issue with switching levels and the custom HUD. When you are injured and enter a winzone it resets your max health to your current health, for example if you entered the winzone with 55/100 health, when you load into the new level you wil have 55/55 health.

Here's a video showing what's happening, note how before entering the HUD says 53/100, after loading into level 2 it says 53/53, and if I turn on the normal HUD it says 53/100:



I've been speaking with smallg over private messages about this and even he doesn't know how to fix it, and I was wondering if anybody else had come across this and knows how to fix it.

Here's the script:

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.

Attachments

Login to view attachments
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 25th Jun 2016 18:29
fixed it for you, i found a variable that stores the max health inside gameloop.lua
Quote: "g_gameloop_StartHealth"
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 25th Jun 2016 18:36 Edited at: 25th Jun 2016 18:55
Awesome, thanks a lot smallg, you're the best!

Just need to work out how to get the flashlight script to allow batteries and power % to carry over levels now

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.
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 25th Jun 2016 19:43 Edited at: 25th Jun 2016 19:50
edit, fixed the flashlight too but you will be needing my autosave winzone as it will read the values from the save slot... still trying to think of a way to delete the file on a new game (otherwise you will start with the same amount of batteries as in the autosave) but at least it will carry over the batteries.

p.s. the game's looking good!
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 25th Jun 2016 19:47
Sounds good to me, should be fine, can always edit the save/load menu to not display the button for the last slot. Might have a look at that sometime.

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.

Login to post a reply

Server time is: 2024-12-22 18:20:17
Your offset time is: 2024-12-22 18:20:17