help with hudmessage for zdoom

can anyone help me figure out how to use...

hudmessage (text; int type, int id, int color, fixed x, fixed y, fixed holdTime, ...);

i have tried to figure it out but with no success :/

Share this post


Link to post

You can just use this:

print(s:"message");

as it always appears in the centre, and you can change the colour by using: \cd (green), \cf (yellow) , \cg (red) and \n to start a new line. All of the other commands are in the ZDoom reference.

Share this post


Link to post

Thanks Tarin, that was a big help. now if only i could make the text bigger :/

Share this post


Link to post
boris said:

Um, compared to hudmessage, print is utter crap.


Indeed. About the only thing you can control with print is the colour. Duration and position are fixed, unlike hudmessage. Also there are different type styles, and fade out effects. Far more flexible, if a little more complex to set up.

Print is fine for simple, short messages to be read and disappear.

Share this post


Link to post

hmm, i don't think the hudmesage likes me :/

when i click compile it gives me ...

**** ERROR ****
Line 43 in file "$.acs" ...
Error #48: Identifier has not been declared.
Identifier: hudmessage
Host byte order: LITTLE endian

how do i fix this?

Share this post


Link to post

yes i am, I updated them all just to be sure. i have fixed the error and wadauthor says there is no errors but the script don't work :/

this is the script...

// Script for RE-DA

#include "zcommon.acs"

// Some useful hudmessage defines
#define CR_BRICK 0
#define CR_TAN 1
#define CR_GRAY 2
#define CR_GREY 2
#define CR_GREEN 3
#define CR_BROWN 4
#define CR_GOLD 5
#define CR_RED 6
#define CR_BLUE 7
#define CR_ORANGE 8
#define CR_WHITE 9
#define CR_YELLOW 10

#define HUDMSG_PLAIN 0
#define HUDMSG_FADEOUT 1
#define HUDMSG_TYPEON 2

#define FOREVER 1

//Little message seen at grave

script 1 (void)
{
print (s:"\cHOk, I think i'm loosing it.");
}

script 2 open
{
hudmessage (s:"Agent, We have just recieved a message from the RPD.\nIt seems that Umbrella has found out that we have sent you to investigate the mansion.\nUmbrella has dispatched troops to stop you from gaining entrance to the Hive"; HUDMSG_TYPEON, 0, CR_WHITE, 0.5, 0.0, 30.0,
0.05, // Time to spend typing each character.
1.0 // Time to fade away.
);

// Let the message go away:
// 0.9 seconds to type (18 chars * 0.05 sec/char)
// 4.0 seconds to hold
// 1.0 second to fade away
delay (const:((0.9+4.0+1.0)*35)/65536);
}

everything looks right but i could be wrong.

Share this post


Link to post

Hmm, I can't see any error in the script either. All I can think of is that WA does not use the right ACC version to compile the scripts (that's why it's complaining that "hudmessage" is not known). When WA shows the compile error it should also show the ACC version. Make sure that you are really using the latest ACC version.

Share this post


Link to post
Cyrez said:

0.05, // Time to spend typing each character.
1.0 // Time to fade away.
);



In the last line, should that ) be a } ?

edit: I think im wrong...

Share this post


Link to post

At some point (don't remember exactly when) Randy put all the hudmessage defines into the distribution files. So there is no need to add them yourself, and IIRC adding them to your own script would give an error message.

So, try removing them from your script and see what happens.

Share this post


Link to post

Enjay, nope i did that and i got ...

Original ACC Version 1.10 by Ben Gokey
Copyright (c) 1995 Raven Software, Corp.
This is version 1.15 (Jul 5 2000)
This software is not supported by Raven or Activision
Additional changes for ZDoom by Randy Heit
Further changes by Brad Carney
Error reporting improvements and limit expansion by Ty Halderman
**** ERROR ****
Line 14 in file "$.acs" ...
Error #48: Identifier has not been declared.
> hudmessage (s:"Agent, We have just recieved a message from the RPD.\nIt seems that Umbrella has found out that we have sent you to investigate the mansion.\nUmbrella has dispatched troops to stop you from gaining entrance to the Hive"; HUDMSG_TYPEON,
> ^
Identifier: hudmsg_typeon
Host byte order: LITTLE endian

Thats it, it hates me, i new it :P

Share this post


Link to post

I just got the following to compile under both DeePsea's internal compiler, and ACC 1.21:

#include "zcommon.acs"

#define FOREVER 1

//Little message seen at grave

script 1 (void)
{
print (s:"\cHOk, I think i'm loosing it.");
}

script 2 open
{
hudmessage (s:"Agent, We have just recieved a message from the RPD.\nIt seems that Umbrella has found out that we have sent you to investigate the mansion.\nUmbrella has dispatched troops to stop you from gaining entrance to the Hive"; HUDMSG_TYPEON, 0, CR_WHITE, 0.5, 0.0, 30.0,
0.05, // Time to spend typing each character.
1.0 // Time to fade away.
);

// Let the message go away:
// 0.9 seconds to type (18 chars * 0.05 sec/char)
// 4.0 seconds to hold
// 1.0 second to fade away
delay (const:((0.9+4.0+1.0)*35)/65536);
}

And I think the reason is clear - Look at the output I got (especially the version number).

This is version 1.21 (Feb 25 2002)
This software is not supported by Raven Software or Activision
Changes for ZDoom by Randy Heit
Further changes by Brad Carney
Error reporting improvements and limit expansion by Ty Halderman
Host byte order: LITTLE endian

"0000.acs":
25 lines (495 included)
0 functions
2 scripts
1 closed
1 open
0 global variables
0 world variables
0 map variables
object "0000.o": 372 bytes

Share this post


Link to post

WOOHOO! thanks alot guys for all your help, it works great :)
i had forgoten to move the new ACC files to the zdoom directory.

I guess it would help if the scripter was smarter than the script he is writeing :P

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now