Readable Notes?

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
Hornfluffy1964
Posts: 26
Joined: Thu Aug 18, 2016 11:11 pm
Location: West Middlesex
Contact:

Readable Notes?

Post by Hornfluffy1964 »

Hello, this is my first post here. New Member. I have been creating a WAD file in Slade and I had a question regarding on how to add readable notes. Meaning when a player goes up to a FLAT sector and presses the 'USE' key the game will pause and show an Image of a note. The best example that I've seen of this was in City of The Damned: Apocalypse In that wad, it works just as described. The player can go up to a linedef or sector, press the use key and a image will pop up and fades in and pause the game. If anybody has any ideas on how to do this please let me know in the comments. Perhaps it can be done in decorate? Or with a script?

P.S. I am using GZ doom builder
User avatar
Kappes Buur
 
 
Posts: 4201
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Readable Notes?

Post by Kappes Buur »

Since you mentioned that pwad, after you open TheCityOfTheDamned.wad with GZDoom Builder you can open the scripts (default key F10) where you will see how this was done.

For example, check out how Script 3 is activated

Code: Select all

script 3 (void)
{
    //Only from the other side
    Print(s: "\cCThis door can only be opened from the other side!");
} 
Script 3 is attached to the linedefs of this door and triggered by pressing the use key

Image

From a personal pov I have just one complaint about the print statement. When playing with a resolution higher than 800x600 the printed message is very small and hard to read. So I would suggest to use HudMessage instead, to avoid for the player to use a magnifying glass. :x

Code: Select all

{
    SetFont ("DBIGFONT");
    SetHudSize(960, 600, 0);
    HudMessage(s:"\cF Your text here";
       HUDMSG_FADEOUT, 0, 4, 450.0, 175.0, 5.0, 3.0);
}
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: Readable Notes?

Post by Blue Shadow »

Kappes Buur wrote:From a personal pov I have just one complaint about the print statement. When playing with a resolution higher than 800x600 the printed message is very small and hard to read. So I would suggest to use HudMessage instead, to avoid for the player to use a magnifying glass. :x
[wiki=Message_options#Scale_text_in_high_res]HUD options -> Message options -> Scale text in high res[/wiki]
User avatar
Kappes Buur
 
 
Posts: 4201
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Readable Notes?

Post by Kappes Buur »

:thumb:
Thank you
User avatar
Hornfluffy1964
Posts: 26
Joined: Thu Aug 18, 2016 11:11 pm
Location: West Middlesex
Contact:

Re: Readable Notes?

Post by Hornfluffy1964 »

Thanks I'll check it out! The reason I wanted to do images is in the game you play as a Private detective in the 1930s that solves crime like puzzles by finding notes/pictures or other items of interest so finding these thing would help the player piece together crime scenes they may stumble upon. An example could be a bloody photograph of a women or maybe a safe combo scribbled down.

Here are screens of what I was talking about. There is a letter with this exclamation point above it. When you press use the game freezes the player and this image of a note comes up. So my question is how to you freeze the player and popup an image?

https://postimg.org/gallery/mzaifi4a/622c825d/
User avatar
Hornfluffy1964
Posts: 26
Joined: Thu Aug 18, 2016 11:11 pm
Location: West Middlesex
Contact:

Re: Readable Notes?

Post by Hornfluffy1964 »

I think I figured it out.

//LETTERS & TEXTS
int letterlooked1=0;
int letterlooked2=0;
int letterlooked3=0;
int letterlooked4=0;
int letterlooked5=0;
int letterlooked6=0;
int letterlooked7=0;
int letterlooked8=0;
int letterlooked9=0;
int letterlooked10=0;
int letterlooked11=0;
int letterlooked12=0;
int letterlooked13=0;
int letterlooked14=0;
int letterlooked15=0;
int letterlooked16=0;
int letterlooked17=0;

script 201 (void)
//LETTER #1
{
if (letterlooked1==0)
{
letterlooked1=1;
thing_stop(0);
SetHudSize(640, 480, 0);
Setfont("LETTER_1");
Hudmessage(s:"a";
HUDMSG_FADEINOUT, 1, CR_WHITE, 320.0, 240.0, 500.0, 1.0, 1.0);
Setfont("smallfont");
SetPlayerProperty(0, 1, PROP_TOTALLYFROZEN);
}
else
{
letterlooked1=0;
SetHudSize(640, 480, 0);
Setfont("LETTER_1");
Hudmessage(s:"a";
HUDMSG_FADEINOUT, 1, CR_WHITE, 320.0, 240.0, 0.0, 0.0, 1.0);
Setfont("smallfont");
SetPlayerProperty(0, 0, PROP_TOTALLYFROZEN);
}
}
Locked

Return to “Editing (Archive)”