Cacowad Posted July 20, 2012 Hi to everybody, it is a pleasure to see how many Doom modders still exist out there. returning to the problem, i was trying to use (like quite everybody here) a simple Hudmessage; this is the code: ----------------------------------------------------------------- #include "zcommon.acs" int health; [...] script 4 (void) { SetFont ("SMALLFONT"); while (GetActorProperty (30, APROP_Health) > 1) { health = GetActorProperty (30, APROP_HEALTH); HudMessageBold (s:"\crGory : " ,d:health; HUDMSG_PLAIN, 1, CR_RED, -0.8, 0.8, 0); delay (1); } } ------------------------------------------------------------------- maybe you will ask, so where is the problem? well, Doombuilder 2 script editor recognise the semicolon after "d:health" as an end of line and omit the rest of the code. i may also use this alternative code listed below, but is the ugliest i ever seen. ------------------------------------------------------------------- #include "zcommon.acs" int health; script 4 (void) { while (GetActorProperty (30, APROP_Health) > 1) { health = GetActorProperty (30, APROP_HEALTH); Printbold (s:"\crGory : ",d:health); Delay (1); } } -------------------------------------------------------------------- the question is, can i still use the script builder in Doombuilder 2, or i must use another program like Deepsea or ACC115 to do this? if i can still use DB 2, where i missed something? thak you all. 0 Share this post Link to post
GreyGhost Posted July 20, 2012 Try using a comma instead of a semicolon after "d:health". 0 Share this post Link to post
Cacowad Posted July 20, 2012 already tryed, but it jump directly to the "color" line block. 0 Share this post Link to post
GreyGhost Posted July 20, 2012 My mistake - I should have acquainted myself with the HudMessage syntax before replying. This worked for me in GZDoom after a bit of trial and error. #include "zcommon.acs" [...] script 4 ENTER { SetFont ("SMALLFONT"); while (GetActorProperty (0, APROP_Health) > 1) { int health = GetActorProperty (0, APROP_HEALTH); HudMessageBold (s:"\crGory : ", d:health; HUDMSG_PLAIN, 1, CR_RED, -0.8, 0.8, 0); delay (1); } } Changed the script type to ENTER so it will run automatically instead of having to be puked from the console, set the "GetActorProperty" TID to 0 (the activator) and changed how the health integer is defined. Now I'll just sit back and wait for someone to tell me I've done it all wrong. 0 Share this post Link to post
Cacowad Posted July 20, 2012 thank you for your effort, finally i found what gave me the error. the first one is how the integer was defined (i don't know why it doesen't work previus), and second, the x,y coordinates: -8,8 are too big numbers and they simply went outside my screen. i changed that with -0.02,0.05 and now it fits perfectly. thank you again for your support. 0 Share this post Link to post