Tormentor667 Posted November 29, 2002 I have got another question: Can I adjust the x/y coordinates of the text output script function in ZDoom?! For example if I want to place the text ind the lower left corner or something like this! 0 Share this post Link to post
boris Posted November 29, 2002 When you are using ZDoom 1.23 or later you can use hudmessage. You can get an example .wad with fully documented ACS source here. Keep in mind that you also grab a new ACC, which you can get here. 0 Share this post Link to post
Tormentor667 Posted November 30, 2002 Thx alot for your help Tarin but unfortunately the hudmessage command doesn't work for me... looks like I'm doing something wrong. Well, I have the latest version of acc and zdoom and I can save my script without problems but if I run the script in my map, no text is shown :( I read the tutorial page but I don't understand the part about the position of the message (-1.0, 0.0, etc.) Could you be honestly enough to explain this to me more detailed?! 0 Share this post Link to post
boris Posted November 30, 2002 Tormentor667 said:Thx alot for your help Tarin but unfortunately the hudmessage command doesn't work for me... looks like I'm doing something wrong. Well, I have the latest version of acc and zdoom and I can save my script without problems but if I run the script in my map, no text is shown :( Does the example map work? Does the script compile without errors? If you're using WadAuthor as your editor add #WADAUTHOR at the beginning of your script. Also you might want to try the DOS version of ACC (I had some problems with the Windows versions of ST's ACC, WadAuthor seemed to compile the scripts fine, but it turned out that it did not even run ACC). Tormentor667 said:I read the tutorial page but I don't understand the part about the position of the message (-1.0, 0.0, etc.) Could you be honestly enough to explain this to me more detailed?! Did you have a look at hudmsg.acs? It's all explained in there. Anyways, a hudmessage looks like this: hudmessage(string; type, id, color, x-coord, y-coord, time [, speed] [, fadetime]); string is the displayed text (like s:"hello world"). You can concatenate several strings by seperating them with commas (like s:"hello ", s:"world"). Note that you have to add a semi-colon (';') after the last string). type defines how the text is "written" onto the screen. It can be 0 (displayed as with print), 1 (text fades) or 2 (letters are written after each other). Or just copy'n'paste the #defines from hudmsg.acs :) id is a unique number for the hudmessage. So you can have several different messages at the same time and they will still work fine without interfering with each other color is the color (duh) of the text. Can be 0 to 10. Just copy'n'paste the #defines from hudmsg.acs x-coord and y-coord are the position of the text relative to the screen border. 0.0/0.0 is the top left edge of the screen, 1.0/1.0 is the bottom right edge of the screen. So if you wanted a text to be displayed in the center you'd use 0.5/0.5 for x and y coords. Using negative number will change how the text is aligned, but I'm nur sure how that works. time simply says how long (in seconds) the text will be displayed. Use 0 to display it forever. speed is optional. It defines how long it takes (in seconds) to write a single letter. 0.05 seems to be a good value. fadetime is optional too. It defines how long it takes (in seconds) the text to completely fade. I hope this helps you to get started, because it took me quite some time to write it ;) 0 Share this post Link to post
Enjay Posted December 1, 2002 boris said:I hope this helps you to get started, because it took me quite some time to write it ;) Well, I don't know about Tormentor667, but it helped me. As it happens I was doing some stuff with hudmessage today and having a bit of difficulty working out which parameter was what. It's all clear now. So thanks. A bit of further info. The colour definitions no longer need to be added to your own script, as Randy added them to zdefs.acs some time ago. Indeed defining them in my own script as well as having them in zdefs.acs gave an error. There is one further colour define that I don't think was mentioned in hudmsg.acs CR_UNTRANSLATED -1 Where hudmessage will display the text graphics in their original colours, allowing it to display pictures for example. 0 Share this post Link to post
Tormentor667 Posted December 4, 2002 Thx alot Tarin :) I'll try it as soon as my ZETH works again :) 0 Share this post Link to post