Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
DASI-I

Custom text in Doom 2

Recommended Posts

I've just finished a WAD with 5 maps. now i want to add text either in between levels or during ingame that are triggered by walking over a certain linedef or sector. I know my way around doom builder 2 but thats about it. I know DB2 has a button that takes you to a script editor but dont know where to begin. A nice step by step of how to do it would be nice. Thanx in advance.

Share this post


Link to post

Read up on Cluster definitions: http://zdoom.org/wiki/MAPINFO/Cluster_definition
Here is an example of text between maps using MAPINFO:

Map MAP01 "Test"
{
LevelNum = 1
Next = "MAP02"
SecretNext = "MAP02"
Sky1 = "SKY1"
Cluster = 1
Music = "D_RUNNIN"
}

Cluster 1
{
Flat = "FLOOR4_8"
Music = "D_VICTOR"
ExitText = "Replace me with something cool"
}

Share this post


Link to post

You could make one more map, and just modify the text that comes right before Dead Simple using DeHackEd. Or worse, start your wad on MAP02

Share this post


Link to post
jdagenet said:

Read up on Cluster definitions: http://zdoom.org/wiki/MAPINFO/Cluster_definition
Here is an example of text between maps using MAPINFO:

Map MAP01 "Test"
{
LevelNum = 1
Next = "MAP02"
SecretNext = "MAP02"
Sky1 = "SKY1"
Cluster = 1
Music = "D_RUNNIN"
}

Cluster 1
{
Flat = "FLOOR4_8"
Music = "D_VICTOR"
ExitText = "Replace me with something cool"
}



Thanks man, I'll give it a try. And thanks to everyone else for posting I am at least a few steps closer to my goal.

I also forgot to mention that this only needs to work for GZDoom

Share this post


Link to post

Ok, so Ive tried it and when I compile it it gives me this error: "invalid declarator" for (line 0). SHould I be using Zdoom ACS Script or ZDoom USDF Script or something else....or is THAT even the problem. Ive tried many combos and they all have this issue. I probably could figure it out myself if only I knew what "invalid declarator" meant.

Share this post


Link to post

This isn't an ACS script, it's for the MAPINFO lump that you put in your actual wad. You can use a wad editor such as Slade to make a MAPINFO lump. Once you make one, you copy and paste the code into the lump.

Share this post


Link to post
DASI-I said:

I've just finished a WAD with 5 maps. now i want to add text either in between levels or during ingame that are triggered by walking over a certain linedef or sector.


For that, see Krispy's first reply.

Except do not use an ENTER or OPEN script. Use a normal script (void) and set some linedef to use action 80: ACS_Execute with the script number.

If you want it to be activated when entering a sector, you can use this sector action thing, place it in the sector and give it the action 80 as its special.

Share this post


Link to post

Yeah, I posted an ACS script. It's a way of doing what you asked in a simpler manner, although it's not what you had in mind.

Share this post


Link to post

I got the exittext working, thanks for the help. I had to create a text file called MAPINFO.txt, placed the code in it and drag'n dropped it in the WAD using Slade. A fantastic program i must say. XWE is much harder to use...and more unstable!

Im now trying to get the ingame text to work
Can somebody give me a more detailed example of what the script looks like? you know, that causes the text to pop up (in the middle of the screen) as I step on a certain sector, or cross over a certain line-def?

Share this post


Link to post

http://zdoom.org/wiki/HudMessage

This link will describe how the text is printed, where it will appear on the screen, what color it will be, etc. It show examples of different HudMessage scripts, and also examples of x-y coordinates on screen.

Share this post


Link to post
Krispy said:

http://zdoom.org/wiki/HudMessage

This link will describe how the text is printed, where it will appear on the screen, what color it will be, etc. It show examples of different HudMessage scripts, and also examples of x-y coordinates on screen.


Yea, I've already been to that page before but I cant seem to find anything on how to trigger the text when the player steps over a certain sector or line-def. All I can see in that page is how to set the color, position, font, etc... :\

Share this post


Link to post

Go to line actions, then action 80, which is "script execute". Then set which script to execute and how it will be triggered.

Share this post


Link to post
Krispy said:

You could make a Hud Message like this:

script 1 open

{
    hudmessage (s:"I am saying stuff in this map.";
    HUDMSG_TYPEON, 0, cr_yellow, 0.1, 0.1, 500, 500, 100);
}
http://zdoom.org/wiki/HudMessage

Im tring to do that but using this code didnt work, it gave me an error when I tried to test the map.

Share this post


Link to post
15098D said:

Im tring to do that but using this code didnt work, it gave me an error when I tried to test the map.


Try copying and pasting this:

#include "zcommon.acs"

script 1 open

{
hudmessage (s:"I am saying stuff in this map.";
HUDMSG_TYPEON, 0, cr_yellow, 0.1, 0.1, 500, 500, 100);
}

Share this post


Link to post
Krispy said:

Try copying and pasting this:

#include "zcommon.acs"

script 1 open

{
hudmessage (s:"I am saying stuff in this map.";
HUDMSG_TYPEON, 0, cr_yellow, 0.1, 0.1, 500, 500, 100);
}


Thanks, I'll try.

Share this post


Link to post
Krispy said:

Try copying and pasting this:

#include "zcommon.acs"

script 1 open

{
hudmessage (s:"I am saying stuff in this map.";
HUDMSG_TYPEON, 0, cr_yellow, 0.1, 0.1, 500, 500, 100);
}

OK, it works but the message onluy stays for half a second

Share this post


Link to post
Krispy said:

Try copying and pasting this:

#include "zcommon.acs"

script 1 open

{
hudmessage (s:"I am saying stuff in this map.";
HUDMSG_TYPEON, 0, cr_yellow, 0.1, 0.1, 500, 500, 100);
}

actually, never mind, I fixed the code :D THANK YOU! IVE BEEN TRYING TO GET THIS TO WORK FOREVER!

Share this post


Link to post
Badboy said:

>action 80, which is "script execute".

what action is it db2 ? it isnt 80.

Yes it is.

If you're not seeing it, though, that most probably means you aren't using enhanced map formats (UDMF or Hexen format), so you cannot use ACS at all -- at least, not directly.

Share this post


Link to post

thanks!

right now im using the normal zdoom format. if i use zdoom udmf, is there a general Change in the map? like monster wakeup distances or something big.

Share this post


Link to post

No, distances aren't changed.

Closest thing to a behavior change is that in Hexen format (not UDMF, though, just Hexen format) monsters can activate certain line types that they cannot in Doom format (or was it the reverse, I forgot) unless a MAPINFO option is set.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×