Problems with HUDMESSAGE and DIALOGUE I really need help with

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
AshHouswares
Posts: 145
Joined: Fri Jun 03, 2022 11:31 am
Graphics Processor: Not Listed

Problems with HUDMESSAGE and DIALOGUE I really need help with

Post by AshHouswares »

Okay I've spent days trying to get these to work and I honestly have no idea why they will not work.

First, HUDMESSAGE (which is an IMAGE).
I have set up a lot of documents and pictures that can be read by the player and displayed as a HUDMESSAGE IMAGE. They all work perfectly except my latest one. I have no idea why, but it's just not working. It's a sprite item that sits on the edge of a 3D table, and I have set the corners of the 3D table to act as script activators when the player presses "do" on them (to read the note). It's supposed to load up the full size image for the player to read, and it's meant to stay on screen until the player presses a button. It does not work whatsoever. Here is my code:

//examine letter in dining room. script 130 (void) { SetPlayerProperty(0,1,PROP_TOTALLYFROZEN); SetFont("PGRM1"); // REVEAL large LETTER. SetHudSize(320,200,0); HudMessage(s:"A";HUDMSG_PLAIN,1,CR_UNTRANSLATED,160.0,100.0,0); while(true){ //Once the message is shown, start the loop if(GetPlayerInput(-1,INPUT_BUTTONS)&BT_USE){break;} //Detect if +USE (e) was pressed and break the loop Delay(1); //Delay it by tic so it doesn't terminate } SetPlayerProperty(0,0,PROP_TOTALLYFROZEN); HudMessage(s:"";HUDMSG_PLAIN,1,CR_UNTRANSLATED,160.0,100.0,1.0); //Make the message disappear }

Nothing happens whatsoever when the linedefs that activate the script are pressed. Help please?

Second problem is similar, but with DIALOGUE.

I have a bunch of Voxels around my games map of open books. The idea is that the player can interact with these by pressing "do" to trigger a DIALOGUE lump. All my books work perfectly, except the latest one.

It is a book set up on a crate, and it has Conversation ID = 2. Pressing on it though does not trigger it whatsoever. I have no idea why. My DIALOGUE lump is set up fine, everything that is meant to be displayed is in there, but the book is not activating. The strangest thing that all the others, which are all set up the same, are working perfectly. What's wrong with this one?

Here is my DIALOGUE LUMP.
namespace = "ZDoom"; include = "SCRIPT00"; //CubbyHouse Note. conversation { id = 1; actor = "JournalOpen"; page //Page 1 { name = "Journal Entry (Page 1)"; dialog = "TEXT GOES HERE."; choice { text = "next page."; nextpage = 2; } } page //Page 2 { name = "Journal Entry (Page 2)"; dialog = "text goes here"; choice { text = "next page."; nextpage = 3; } } page //Page 3 { name = "Journal Entry (Page 3)"; dialog = "TEXT GOES HERE"; choice { text = "next page."; nextpage = 4; } } page //Page 4 { name = "Journal Entry (Page 4)"; dialog = "text goes here"; choice { text = "Read again."; nextpage = 1; } } } //IMPORTANT NOTE DO NOT SKIP conversation { id = 2; actor = "JournalOpen"; page //Page 1 { name = "Warning tutorial"; dialog = "TEXT GOES HERE"; choice { text = "next page."; nextpage = 2; } } page //Page 2 { name = "Warning Tutorial"; dialog = "TEXT GOES HERE"; choice { text = "next page."; nextpage = 3; } } page //Page 3 { name = "Warning Tutorial"; dialog = "TEXT GOES HERE"; choice { text = "next page."; nextpage = 1; } }

Anyone got any idea what I can do to fix this? What the heck is wrong with it?
Blue Shadow
Posts: 4995
Joined: Sun Nov 14, 2010 12:59 am

Re: Problems with HUDMESSAGE and DIALOGUE I really need help with

Post by Blue Shadow »

Regarding the HudMessage problem, run the following command from the console to test script.

Code: Select all

puke 130
If the script executes fine, then the problem is most likely that the linedefs aren't set up properly for script activation.

Return to “Scripting”