FreeSpace Releases > Scripting Releases

Custom Wingmen HUD Gauge [features now in FSO]

<< < (4/17) > >>

wookieejedi:

--- Quote from: m!m on October 17, 2018, 12:43:31 pm ---This looks pretty nice :yes: The default wingman gauge was always a little limited for my tastes...

I had some previous instances where I wanted to scale the health of a ship to a color and I found out that it is better to add a second color step in the middle to avoid that ugly red/green mix. When you use a shade of orange at 50% health the progression should look a bit nicer.

EDIT: Also, your script is nicely isolated from the rest of the scripting system. Only once global variable and everything else is local. I know that may be obvious to you but I see way too many scripts that pollute the global namespace :yes:

--- End quote ---

Thank you! Ah adding an orange step is a very good idea. I appreciate the coding comments, I learned a lot of how to lua script from reading your and Axem's scripts : D

Spoon:
So I ran into a big issue that FRED couldn't save to the mission file that was open in FSO. FRED didn't give any warnings, it just straight up undid all of the changes made and would only agree to save to the file if the mission was no longer open in FSO. Behavior I had never seen before and wrongly attributed to some bug in recent builds and/or FRED. Thankfully, Axem is a very smart man, and he figured out that bug was caused by this script. Probably because it reads the wing names from the mission file, and then keeps the file open. Preventing FRED from writing to it.

Just a heads up to everyone using the script in its current version.

wookieejedi:

--- Quote from: Spoon on October 20, 2018, 09:32:31 am ---So I ran into a big issue that FRED couldn't save to the mission file that was open in FSO. FRED didn't give any warnings, it just straight up undid all of the changes made and would only agree to save to the file if the mission was no longer open in FSO. Behavior I had never seen before and wrongly attributed to some bug in recent builds and/or FRED. Thankfully, Axem is a very smart man, and he figured out that bug was caused by this script. Probably because it reads the wing names from the mission file, and then keeps the file open. Preventing FRED from writing to it.

Just a heads up to everyone using the script in its current version.

--- End quote ---

Thanks for the update, I have fixed the issue and uploaded a new version (v1.2). That must have been very annoying to try and figure out, and I am sorry about all that extra bug fixing I put you guys through!

The new version also incorporates the intensity value from the player's HUD settings as well, so if you like a brighter or darker HUD the gauge will match what you have set.

m!m:
I made some changes to how the engine handles the file handles so that you get yelled at if you forget to close a file handle so this shouldn't happen again in the future.

wookieejedi:
Good idea! It's fixed in this script now, but that is definitely a good safety check to have for any future scripts.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version