Hudmessage query.

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Hudmessage query.

Post by Lexus Alyus »

Would somene be able to supply me with a simple script that will allow an hud message to display only whilst the palyer is standing in a sector (just type the code in this forum and I'll paste it into my actual game script). Once the palyer leaves the sector the message needs to dissapear, but the message needs to always be there if the player is standing in the sector. Credit will be given :).

Thanks in advance.

:twisted:
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: Hudmessage query.

Post by XutaWoo »

Attach this script to an "Actor Enters Sector" thing:

Code: Select all

script 76 (void)
{
  Print(s:"I'ma sector!");
  delay(1);
  restart;
}
Attach this script to an "Actor Exits Sector" thing:

Code: Select all

script 77 (void)
{
  ACS_Terminate(76, 0, 0, 0, 0);
  Print(s:"");
}
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Hudmessage query.

Post by InsanityBringer »

Looping print will fill up the console instantly. That's really annoying. What you could do is specify a hudmessage with the plain style and a duration of 0, to be displayed on a actor enters sector object. This will make it stay on forever. Then, attached to a actor leaves sector, just display a blank hudmessage with the same ID as the last.

So the scripts would be:

Code: Select all

Script 1 (void)
{
    Hudmessage(s:"Message"; HUDMSG_PLAIN, 1, CR_UNTRANSLATED, 0.0, 0.0, 0.0);
}
This would be attached to the Actor enters sector object

Code: Select all

Script 2 (void)
{
    Hudmessage(s:""; HUDMSG_PLAIN, 1, CR_UNTRANSLATED, 0.0, 0.0, 0.1);
}
This would be attached to the Actor leaves sector object
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Re: Hudmessage query.

Post by Lexus Alyus »

Cool, thanks for that. I would have never have thought to use these. I'll mention you two in the credits :).

Man, I'm quite rusty... it's been a while since I touched an editor... but I've decided to make a return. It could take a while but I'm going to try my hardest to get this project finished! It's been in the planning phases for over 2 years now! :D All the resources and story elements are done... the only things left to do now are the levels. I've made a start and I'm liking where this is going. Hopefully this will be good :D.

.Lexus out.

:twisted:
User avatar
Remmirath
Posts: 2562
Joined: Sun Dec 23, 2007 3:53 am
Graphics Processor: nVidia with Vulkan support
Location: My house
Contact:

Re: Hudmessage query.

Post by Remmirath »

So you're definitely back. :D

And don't worry, you'll get your hand back to Doom modding again. You were quite skilled, from what i remember from old posts. :)
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Re: Hudmessage query.

Post by Lexus Alyus »

Yeah, I'm gonna attempt to get something finished and released :D.

:twisted:
Locked

Return to “Editing (Archive)”