How can i make a text box ?

Nesmanx

Straight outta E1M1
Ok so text prompts are pretty complicated as they require both SOC and linedef executors in order to work and the wiki doesn't have much info on this topic so I'll try to explain it as best as I can.

To get started, open up SLADE and create a text file, name it whatever you want (although if your mod file is a WAD, then you'll have to add SOC_ before the name.) Now in our text file, we're going to declare a prompt, copy and paste this bit of code into your text file.
Sonic Object Configuration (SOC):
(Make sure to remove the comments!)
Prompt 10 #This line defines the prompt number, this value should never go beyond 291.
NumPages 1 #How many pages our text prompt will have.
PAGE 1 #This line starts a page block, which will contain the text the prompt will say.

Now that we have our prompt defined, lets fill in our first page block. Now there are many different parameters we can set here (With a few of them having no info on the wiki,) but let's just keep things simple for now. Below are the definitions for a pretty simple text block.
Sonic Object Configuration (SOC):
Prompt 10  #This line defines the prompt number, this value should never go beyond 291.
NumPages 1  #How many pages our text prompt will have.
PAGE 1  #This line starts a page block, which will contain the text the prompt will say.
Tag = YOMAMA1  #The text used to call this prompt. This will be used by our linedef executor.
Name = Nesmanx  #The name of the person or thing that will be saying our stuff, this is optional.
Lines = 4  #How many lines our text prompt will be given.
TimeToNext = 5*TICRATE  #How long this text box will stay on screen until moving onto the next.
PageText = Yo mama's so ugly, when she played Doom Eternal, the only thing they feared was her!
    #
#This will be what our prompt will say, use a hashtag to signify a line break.

By now your text file should look like this:
Sonic Object Configuration (SOC):
Prompt 10
NumPages 1
PAGE 1
Tag = YOMAMA1
Name = Nesmanx
Lines = 4
TimeToNext = 5*TICRATE
PageText = Yo mama's so ugly, when she played Doom Eternal, the only thing they feared was her!
    #
We've got ourselves a simple text prompt. Now how would the player trigger this prompt? How do we see it in game? Well we're going to need a linedef executor!

In your map, create a in-map trigger sector with one of the linedef exec. trigger sector types and a control sector outside of your map with one of its linedefs having one of the linedef exec. trigger actions. Tag your trigger sector to the trigger linedef, y'know, the usual stuff. Now lets give an adjacent linedef action 459: Control Text Prompt, this will trigger our text prompt.
Screenshot 2022-03-02 132225.png

Now there's two ways we can tell our command linedef what prompt we want it to show, we could either type the prompt number into the X offset and the page number into the Y offset, or we can type in the prompts tag into the front textures. By default it will check the front X and Y offsets, but we can check effect 15: Transfer Line if we want to type it in by name instead.
shot.png

If all goes well, then when you boot up SRB2 and trigger your linedef executor, your prompt should show up on the screen!
srb20059.gif

There's many other parameters that can be changed for both the text prompt itself and the linedef executor. For more info, check out the SRB2 Wiki.
https://wiki.srb2.org/wiki/Linedef_type_459
https://wiki.srb2.org/wiki/Text_prompt
Hope this helps out.
 

SpongeSonicGuy(?)

You're buttery.
Ok so text prompts are pretty complicated as they require both SOC and linedef executors in order to work and the wiki doesn't have much info on this topic so I'll try to explain it as best as I can.

To get started, open up SLADE and create a text file, name it whatever you want (although if your mod file is a WAD, then you'll have to add SOC_ before the name.) Now in our text file, we're going to declare a prompt, copy and paste this bit of code into your text file.
Sonic Object Configuration (SOC):
(Make sure to remove the comments!)
Prompt 10 #This line defines the prompt number, this value should never go beyond 291.
NumPages 1 #How many pages our text prompt will have.
PAGE 1 #This line starts a page block, which will contain the text the prompt will say.

Now that we have our prompt defined, lets fill in our first page block. Now there are many different parameters we can set here (With a few of them having no info on the wiki,) but let's just keep things simple for now. Below are the definitions for a pretty simple text block.
Sonic Object Configuration (SOC):
Prompt 10  #This line defines the prompt number, this value should never go beyond 291.
NumPages 1  #How many pages our text prompt will have.
PAGE 1  #This line starts a page block, which will contain the text the prompt will say.
Tag = YOMAMA1  #The text used to call this prompt. This will be used by our linedef executor.
Name = Nesmanx  #The name of the person or thing that will be saying our stuff, this is optional.
Lines = 4  #How many lines our text prompt will be given.
TimeToNext = 5*TICRATE  #How long this text box will stay on screen until moving onto the next.
PageText = Yo mama's so ugly, when she played Doom Eternal, the only thing they feared was her!
    #
#This will be what our prompt will say, use a hashtag to signify a line break.

By now your text file should look like this:
Sonic Object Configuration (SOC):
Prompt 10
NumPages 1
PAGE 1
Tag = YOMAMA1
Name = Nesmanx
Lines = 4
TimeToNext = 5*TICRATE
PageText = Yo mama's so ugly, when she played Doom Eternal, the only thing they feared was her!
    #
We've got ourselves a simple text prompt. Now how would the player trigger this prompt? How do we see it in game? Well we're going to need a linedef executor!

In your map, create a in-map trigger sector with one of the linedef exec. trigger sector types and a control sector outside of your map with one of its linedefs having one of the linedef exec. trigger actions. Tag your trigger sector to the trigger linedef, y'know, the usual stuff. Now lets give an adjacent linedef action 459: Control Text Prompt, this will trigger our text prompt.
View attachment 63578
Now there's two ways we can tell our command linedef what prompt we want it to show, we could either type the prompt number into the X offset and the page number into the Y offset, or we can type in the prompts tag into the front textures. By default it will check the front X and Y offsets, but we can check effect 15: Transfer Line if we want to type it in by name instead.
View attachment 63579
If all goes well, then when you boot up SRB2 and trigger your linedef executor, your prompt should show up on the screen!
View attachment 63580
There's many other parameters that can be changed for both the text prompt itself and the linedef executor. For more info, check out the SRB2 Wiki.
https://wiki.srb2.org/wiki/Linedef_type_459
https://wiki.srb2.org/wiki/Text_prompt
Hope this helps out.
Your gif is hilarious.
 

Mathos

Dietz nuts
Ok so text prompts are pretty complicated as they require both SOC and linedef executors in order to work and the wiki doesn't have much info on this topic so I'll try to explain it as best as I can.

To get started, open up SLADE and create a text file, name it whatever you want (although if your mod file is a WAD, then you'll have to add SOC_ before the name.) Now in our text file, we're going to declare a prompt, copy and paste this bit of code into your text file.
Sonic Object Configuration (SOC):
(Make sure to remove the comments!)
Prompt 10 #This line defines the prompt number, this value should never go beyond 291.
NumPages 1 #How many pages our text prompt will have.
PAGE 1 #This line starts a page block, which will contain the text the prompt will say.

Now that we have our prompt defined, lets fill in our first page block. Now there are many different parameters we can set here (With a few of them having no info on the wiki,) but let's just keep things simple for now. Below are the definitions for a pretty simple text block.
Sonic Object Configuration (SOC):
Prompt 10  #This line defines the prompt number, this value should never go beyond 291.
NumPages 1  #How many pages our text prompt will have.
PAGE 1  #This line starts a page block, which will contain the text the prompt will say.
Tag = YOMAMA1  #The text used to call this prompt. This will be used by our linedef executor.
Name = Nesmanx  #The name of the person or thing that will be saying our stuff, this is optional.
Lines = 4  #How many lines our text prompt will be given.
TimeToNext = 5*TICRATE  #How long this text box will stay on screen until moving onto the next.
PageText = Yo mama's so ugly, when she played Doom Eternal, the only thing they feared was her!
    #
#This will be what our prompt will say, use a hashtag to signify a line break.

By now your text file should look like this:
Sonic Object Configuration (SOC):
Prompt 10
NumPages 1
PAGE 1
Tag = YOMAMA1
Name = Nesmanx
Lines = 4
TimeToNext = 5*TICRATE
PageText = Yo mama's so ugly, when she played Doom Eternal, the only thing they feared was her!
    #
We've got ourselves a simple text prompt. Now how would the player trigger this prompt? How do we see it in game? Well we're going to need a linedef executor!

In your map, create a in-map trigger sector with one of the linedef exec. trigger sector types and a control sector outside of your map with one of its linedefs having one of the linedef exec. trigger actions. Tag your trigger sector to the trigger linedef, y'know, the usual stuff. Now lets give an adjacent linedef action 459: Control Text Prompt, this will trigger our text prompt.
View attachment 63578
Now there's two ways we can tell our command linedef what prompt we want it to show, we could either type the prompt number into the X offset and the page number into the Y offset, or we can type in the prompts tag into the front textures. By default it will check the front X and Y offsets, but we can check effect 15: Transfer Line if we want to type it in by name instead.
View attachment 63579
If all goes well, then when you boot up SRB2 and trigger your linedef executor, your prompt should show up on the screen!
View attachment 63580
There's many other parameters that can be changed for both the text prompt itself and the linedef executor. For more info, check out the SRB2 Wiki.
https://wiki.srb2.org/wiki/Linedef_type_459
https://wiki.srb2.org/wiki/Text_prompt
Hope this helps out.
That looks really complicated because i actually wanna make a button so i'll just make the sector go down (i also dont know how to do it right)
 

InsVeg

Member
Nesmanx: I registered solely to say I'm impressed with the effort put into your post, making a GIF and everything. Dang.
 

It'sUrBoy!

“Is Very Cool And Awesome”
All that just to make a damn text box?! SRB2 Modding seem's harder then i thought...
 

Nesmanx

Straight outta E1M1
All that just to make a damn text box?! SRB2 Modding seem's harder then i thought...
To make matters worse, text prompts aren't well documented on the SRB2 wiki, so I had to learn a good chunk of it myself from referencing SRB2s tutorial stage.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Top