zHUD v0.8
Introduction
zHUD is a very rudimentary HP Head-Up Display, reminiscent to the style used in the Zelda series.
zHUD is designed for use with single-actor games.
zHUD uses a set of image files to indicate HP status.
zHUD is written by dismal_science__ and Caethyril .
Parameters
Prefix
This is the prefix of the set of image files being used.
ImgWidth
This is the width of the image files being used (in pixels).
ImgMax
This is the total number of image files.
LastImgSuffix
This is the last number in the set of image files.
LowHealthSE
This is a sound effect to be used when HP is at a critically low level.
SE_Interval
This is the interval at which to play the sound effect (in milliseconds).
zActorID
This is the ID of the actor whose HP will be displayed.
How To Use
zHUD's filename must remain "zHUD.js" in order to work properly.
Place "zHUD.js" in your project's JS / PLUGINS folder.
The example includes 33 image files, all named similarly with the prefix "zhud_x_hp_" and the bearing the same width of "237" pixels.
The first image file- "zhud_x_hp_0.png" -represent the image shown when HP is at its lowest.
The second image file- "zhud_x_hp_128.png" -represents the image shown when HP is full.
The 31 images in-between represent the various possible HP states, in this case, increasing / reducing in increments of 4.
The plug-in controls depends on the ImgMax and the LastImgSuffix parameters. The example uses 33 images, but the plug-in can use any number of files .
For the included example, the parameter ImgMax should be set to "33" and LastImgSuffix should be set to "128".
For this example, the ImgWidth parameter should be set to "237". This may be adjusted depending on the size of the image used.
Place image files in your project's IMG / PICTURES folder.
During gameplay, when HP reaches a critical low, zHUD activates an audible warning- specified in the LowHealthSE parameter.
For the example- LowHealthSE is set to "LowHPBeep", which represents the audio files "LowHPBeep.ogg" and "LowHPBeep.m4a".
Place audio files in the project's AUDIO / SE folder.
SE_Interval represents the amount of time in milliseconds between beeping. It is set to "700" by default but may need to be adjusted depending on the length of the audio file that is used.
Finally, the z Actor ID parameter is the number of the Actor who will be displayed.
zHUD usually updates its display automatically, but in cases where this doesn't happen, you may need to use a script call to do it manually.
Script call:
dismal_sci.zHUD.refreshHUD ();
Plug-In
zHUD.js (76 kb)
Dependencies
None.
License
zHUD is free for use in both commercial and non-commercial projects, as long as both dismal_science__ and Caethyril are credited accordingly.