Animated Hud Example: Difference between revisions
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
=== Early versions of EFPSE CE - current version does not work with this method. === | |||
[[File:Animated HUD Example.gif|right|frameless]] | [[File:Animated HUD Example.gif|right|frameless]] | ||
Animating a HUD element is pretty straight forward and can be effected by global values. In the following example we are using the level loop script so that we can constantly check the value of global.PlayerHealth and inserting that value in to the image sequence | Animating a HUD element is pretty straight forward and can be effected by global values. In the following example we are using the level loop script so that we can constantly check the value of global.PlayerHealth and inserting that value in to the image sequence | ||
Line 9: | Line 10: | ||
player check hp global.PlayerHealth | player check hp global.PlayerHealth | ||
hud image PlayerHP 0.64 0.773 0.4 HUD/PlayerHP$global.PlayerHealth.png | hud image PlayerHP 0.64 0.773 0.4 HUD/PlayerHP$global.PlayerHealth.png | ||
Single image display example | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat0.png | |||
Animated image example | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat0.png | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat0.png | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat1.png | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat2.png | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat3.png | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat4.png | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat5.png | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat6.png | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat7.png | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat8.png | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat9.png | |||
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat10.png |
Latest revision as of 12:19, 3 August 2024
Early versions of EFPSE CE - current version does not work with this method.
Animating a HUD element is pretty straight forward and can be effected by global values. In the following example we are using the level loop script so that we can constantly check the value of global.PlayerHealth and inserting that value in to the image sequence
this part is checking the players health (player check hp global.PlayerHealth)
Then the hud image is loaded: hud image PlayerHP followed by the horizontal, vertical position and scale of the hud image. 0.64 0.773 0.4 then the path to your image. In this case mine is in the HUD folder HUD/PlayerHP.png
That alone will show a single image however if I add $.global.PlayerHealth in to the file name where the image would have its number then when the script reads this part it will see the value, for example, if you are at 50% health then the global.PlayerHealth would equal 50 and the scrip would read PlayerHP$global.PlayerHealth.png as PlayerHP50.png showing image number 50 in the sequence.
player check hp global.PlayerHealth hud image PlayerHP 0.64 0.773 0.4 HUD/PlayerHP$global.PlayerHealth.png
Single image display example
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat0.png
Animated image example
hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat0.png hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat0.png hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat1.png hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat2.png hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat3.png hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat4.png hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat5.png hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat6.png hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat7.png hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat8.png hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat9.png hud image HeartBeat 0.675 0.773 0.4 HUD/HeartBeat10.png