Shkwarkel Posted November 20, 2023 (edited) I'm trying to make my own custom interface and can not overlay over the picture text that shows the health of the player. Different ways either the picture removes the health inscription or the reverse. Please help Code: #include "zcommon.acs" script 1 ENTER { int health = GetActorProperty(0, APROP_HEALTH); while(true) { SetFont("BIGFONT"); HudMessage(d:(health); HUDMSG_PLAIN, 1, CR_RED, 0.5, 1.0, 1.0); Delay(1); health = GetActorProperty(0, APROP_HEALTH); } } script 2 ENTER { SetFont("HUTER"); HudMessage(s: "A"; HUDMSG_PLAIN, 0, 0, 0.5, 1.0, 0); } Edited November 26, 2023 by Shkwarkel 1 Quote Share this post Link to post
Kan3 Posted November 21, 2023 Not 100% sure, but maybe the issue is this: Quote Messages with lower ids will overlap those with higher ids taken from the wiki. The "picture" message will always render on top of the health because of its lower id. I'm saying not 100% sure, because sometimes, an id = to 0 has some "special behavior", so I suggest you to give that a higher id number. 0 Quote Share this post Link to post
Shkwarkel Posted November 24, 2023 (edited) . Edited November 24, 2023 by Shkwarkel 0 Quote Share this post Link to post
Shkwarkel Posted November 24, 2023 The solution to the problem was incorrect idexation in hudmessage. The smaller the number in the index the higher the layer will be. Accordingly, I set the photo for the background of the interface to 100, and the other elements from 1 and more, but not more than 100. And then it turns out that you can set inscriptions on the background of the picture. Code: script 1 ENTER { //Show health SetHudSize(220, 200, 1); SetFont("BIGFONT"); HudMessage(d:(health); HUDMSG_PLAIN, 1, CR_GREEN, 47.5, 184.0, 1.0); health = GetActorProperty(0, APROP_HEALTH); Delay(1); } script 2 ENTER { //Show hud SetFont("HUTER"); SetHudSize(0, 0, FALSE); HudMessage(s: "A"; HUDMSG_PLAIN, 100, 0, 0.5, 1.0, 0); } 0 Quote Share this post Link to post
Shkwarkel Posted November 24, 2023 (edited) . Edited November 24, 2023 by Shkwarkel 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.