Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
baja blast rd.

*** The "ask a miscellaneous editing question" thread ***

Recommended Posts

illuknisaa said:

How about you put a sector action (its a thing you place in map) that triggers when player leaves the sector for script 2? This way player doesn't need to do anything and can just continue normally.


Thanks for the suggestion. So your idea being the message would auto-complete based on the player simply moving away from the original Linedef?

It's a work around, but ideally I'd allow the player to simply hit SPACE (or whatever +use is assigned to) to trigger it themselves (especially given knowing Doom players they will always keep moving on while the message plays).

I'll see if I can do more research. I found something that showed a "while, if" script that basically ran script 1 until the player hit +use and then it ran script 2. But I couldn't understand the syntax enough to know how to pull out the important bits.

Share this post


Link to post

while(!(GetPlayerInput(-1,INPUT_BUTTONS)&BT_USE)) { Delay(1); }

The delay command will be looped until the player who activated the script presses use. Beware, if the script was activated by a non-player, the loop would probably go on forever and keep slowing down the engine, so you should either make sure that the script can't be activated by a non-player, or detect it via PlayerNumber and prevent entering the loop if so. Or intruduce a counter variable and additional condition that will limit the total number of iterations of the loop, terminating it after a fixed amount of time even if the use button is not pressed.

Share this post


Link to post

EDIT:

Ignore me! I worked it out. I was completely over-thinking the problem. I was treating it like an IF/OR command, I didn't realize what you provided was basically a tool to halt the proceedings of a script until a certain condition was met (in this case pressing Use).

I've got it working now. Can't believe that took me three hours!

Thanks for your help!

Just for prosperity (in case anyone comes across this conversation in the future looking for the same answer) the working script is:

script 1 (void)
{
	SetFont("BIGFONT");
	HudMessage(s:"We live...  \nWe live...  \nWe live...  \nWe live... 
\x7F \x7F\x7F\n\nAnd if you believe in the soul \n\n
And you believe in a God\x7F\x7F\x7F\n\n\nPray to them.";
		HUDMSG_TYPEON, 1, CR_WHITE, 0.4, 0.4, 2.0, 0.08, 1.0);
	
	delay(5);
	
	while(!(GetPlayerInput(-1,INPUT_BUTTONS)&BT_USE)) 
	{ 
		delay(1);
	 }
	
	SetFont("BIGFONT");
	HudMessage(s:"We live...  \nWe live...  \nWe live...  \nWe live... 
\x7F \x7F\x7F\n\nAnd if you believe in the soul \n\n
And you believe in a God\x7F\x7F\x7F\n\n\nPray to them.";
		HUDMSG_FADEOUT, 1, CR_WHITE, 0.4, 0.4, 2.0, 1.0);
}


Original post

scifista42 said:

while(!(GetPlayerInput(-1,INPUT_BUTTONS)&BT_USE)) { Delay(1); }


Thanks Sci. I've sort-of implemented, but at the moment the TYPEON message (inside the While loop) just endlessly repeats. I need to to play out once and then stop.

I thought I could use a Delay() followed by an ACS_Terminate inside the loop to end it at the right time, but even with a Delay of 500 the script seems to terminate within a couple of tics and therefore doesn't pick up the use command to bounce over to the FADEOUT replacement message (even thought the TYPEON command continues to play out).

The only way to make it work is to hold down Use so effectively the While command picks up the key-press and moves the script to the FADEOUT message before the Terminate command kicks in. Does Delay not affect Terminate?

I've kind of gotten stuck with this, so any advice would be really appreciated! This is what I've got currently:

script 1 (void)
{
	delay(5);	
	while(!(GetPlayerInput(-1,INPUT_BUTTONS)&BT_USE)) 
	{ 
		SetFont("BIGFONT");
			HudMessage(s:"We live...  \nWe live...  \nWe live...  \nWe live... 
\x7F \x7F\x7F\n\nAnd if you believe in the soul \n\n
And you believe in a God\x7F\x7F\x7F\n\n\nPray to them.";
		HUDMSG_TYPEON, 1, CR_WHITE, 0.4, 0.4, 2.0, 0.08, 1.0);
		delay(500);
		ACS_Terminate(1,0);
	 }
	
	SetFont("BIGFONT");
	HudMessage(s:"We live...  \nWe live...  \nWe live...  \nWe live... 
\x7F \x7F\x7F\n\nAnd if you believe in the soul \n\n
And you believe in a God\x7F\x7F\x7F\n\n\nPray to them.";
		HUDMSG_FADEOUT, 1, CR_WHITE, 0.4, 0.4, 2.0, 1.0);
}
I've also run into a problem that if the Linedef is activated using Use by the player and they didn't remove their hand instantly from the key, the script catches that as a valid "Use" input and instantly moved on. For now I'm just Delaying the whole thing, but ideally I'd tigger the TYPEON message straight away but not the While command for a few tics or so.

Absolutely no idea where to even start doing that though!

Share this post


Link to post
Bauul said:

I've also run into a problem that if the Linedef is activated using Use by the player and they didn't remove their hand instantly from the key, the script catches that as a valid "Use" input and instantly moved on. For now I'm just Delaying the whole thing, but ideally I'd tigger the TYPEON message straight away but not the While command for a few tics or so.

Try this then:

int newly_pressed_use = GetPlayerInput(-1,INPUT_BUTTONS)&BT_USE;
while(1) {
    Delay(1);
    int previously_pressed_use = newly_pressed_use;
    newly_pressed_use = GetPlayerInput(-1,INPUT_BUTTONS)&BT_USE;
    if(newly_pressed_use && !previously_pressed_use) { break; }
}
If this loop is entered while the player is not holding the use button, it will stop looping as soon as the player presses the button, but if the loop is entered while the player is holding the use button, it will stop looping only after the player releases and presses the button again.

Share this post


Link to post

Does anyone know how to put a rage rune from Skulltag doom (to shoot 2ice as fast) in Heretic? I wanted to have runes in Heretic & tried copying & pasting the runes over from an open doom map into the heretic map & in the wad it doesn't understand the rune even though I am running it with Skulltag in Heretic.

Share this post


Link to post

Adding "skulltag_actors.pk3" (or whichever Skulltag resource .pk3 file where the runes are defined) to the Resource list in DB should make DB know the actors. You can also just put things with the rune's spawn number into the map, the editor will label them as "unknown" but they should work in the game.

Share this post


Link to post
scifista42 said:

Adding "skulltag_actors.pk3" (or whichever Skulltag resource .pk3 file where the runes are defined) to the Resource list in DB should make DB know the actors. You can also just put things with the rune's spawn number into the map, the editor will label them as "unknown" but they should work in the game.

Thank you for answering my question but I have tried exactly that & it doesn't work for Heretic. I have Slade 3 but I only know how to take things that already exist & have a derogate. I dont think the runes have that & I don't know how to make that happen in slade 3 but I was kinda thinking that slade 3 would be the only way it would happen. But thanks so much for trying to help.

Share this post


Link to post

I'm trying to figure out how to merge ketchup gore v5 with my map. whenever I test it and shoot an enemy, there's no gore besides the dripping wall decals. I have added the necessary scripts to my map and it doesn't give me a missing script message but there's still no blood. if I just launch ketchup gore alongside the map instead of merging it, it works perfectly but I would rather include it in my map. I just cant seem to get it to work for some reason. Any help would be greatly appreciated.

Share this post


Link to post

Im sure its the gore version, I have tried the no gibs (splatters only) version with the same results. I havent uploaded my map to anything yet so I dont have a link. I merged them using slade 3 and added the scripts to it with gzdoombuilder. It doesnt display unknown script prompts ingame when I merge it but it doesnt show any of the blood sprites coming from the enemy or on the floor, it only shows it on the walls for some reason. I have some custom monster sprites but even when I summon an enemy that I havent modified it still doesnt show. Im not sure if its a sprite or a script issue, it has all the necessary files so I'm really confused on this one.

Share this post


Link to post
scifista42 said:

The runes must have a DECORATE definition somewhere in the skulltag resource .pk3s.

Thats what I figured but I have no clue how to construct the decorate from scratch to be able to shoe the son of a bitch; in. All the decorate I have ever handled was already there provided by some other who-you somewhere else besides where I was at the time upon it's conception....unfortunately...

Share this post


Link to post

@Geister: If Ketchup is a .pk3, your map should also be in a .pk3. Most easily, modify Ketchup to add a "maps" folder to the root directory and put the .wad file with your map into this folder. Refactoring a .pk3 to work as a .wad requires knowledge of differences between the formats (see here) and sometimes isn't possible anyway. If it's not a .pk3, I still think the most easy way to add Ketchup to your map is to actually add your map to Ketchup.

Share this post


Link to post

Post edited.

I got answers to most of my questions at ZDoom forums and by trying out some more. Also, I have an older topic concerning this: https://www.doomworld.com/vb/doom-editing/92003-slade-3-feedback-questions-map-building/

I'm using SLADE with OS X.

Either way, questions that remain:

1. What is the most intuitive way to copy and paste a door? Sometimes when I try there are missing textures, and/or properties. To create a new door from scratch each time shouldn't be the way to go in the long run, right? (Right now I have to select all the lines and copy & paste and the same process for the sector mode).

2. Removing lines/sectors/things with CMD + X doesn’t work although ”Cut” with this hotkey shows in preferences. Backspace seems to work though, but I find CMD + X more efficient.

3. Is there any way to make the opened tabs in menus to remain open, once opened?

Share this post


Link to post
scifista42 said:

@Geister: If Ketchup is a .pk3, your map should also be in a .pk3. Most easily, modify Ketchup to add a "maps" folder to the root directory and put the .wad file with your map into this folder. Refactoring a .pk3 to work as a .wad requires knowledge of differences between the formats (see here) and sometimes isn't possible anyway. If it's not a .pk3, I still think the most easy way to add Ketchup to your map is to actually add your map to Ketchup.


Ive got it to working finally! Thanks a ton!!

Share this post


Link to post
Albertoni said:

Open up your gzdoom.pk3 / zdoom.pk3 and check out how the filter folder works there. (It's just a renamed zip file in case you don't know.)


Thanks for your response. I have done exactly what you suggested and there is no FILTER directory to be found.

Am I missing something?

Share this post


Link to post

You're missing the latest version of ZDoom. According to the previously linked ZDoom wiki page, the feature is new from ZDoom 2.8.1.

Share this post


Link to post
scifista42 said:

You're missing the latest version of ZDoom. According to the previously linked ZDoom wiki page, the feature is new from ZDoom 2.8.1.


As usual, the elucidating Scifista reveals all, thank you! Now I have a point from which to work and 'lump filtering' no longer seems a mystery.

Share this post


Link to post

Here's another question:

Why is it that DOOM II monsters (revenant, mancubus, et al) are not SUMMON-able when I play DOOM I. It summons them, but they are invisible and do not deal damage.

Is there a way to implement them when using the DOOM 1 wad file?

Share this post


Link to post

It's because their graphics and sounds are not present in Doom 1 IWAD, and Doom2.wad is not loaded while you play Doom 1. You may load Doom2.wad as a PWAD along with your wad, which should make those graphics and sounds available (but possibly overwrite some other Doom 1 content with Doom 2 one, such as the TITLEPIC, which can be fixed by also loading Doom.wad as a PWAD after Doom2.wad). Another technical possibility would be to reinclude the respective Doom2.wad content into your wad, but that violates copyright and so you shouldn't do it if you plan to release your wad to the public.

Share this post


Link to post

I'm trying to wrap my head around crouching in ZDoom. The ZDoom wiki doesn't give any clear example on how to define player crouching sprites, so could somebody perhaps explain to me how it works?

So the syntax goes like "Player.CrouchSprite sprite", but what does the "sprite" slot exactly require? Can I actually only define one sprite name in there? How can I create animated crouching sprites this way?

Share this post


Link to post

I'm building a church, as is tradition in Doom 2 maps, and I'm really getting tired of seeing the marble texture set already. It's the only "fancy" hell fitting texture there is though, particularly for a church. I don't want to use other textures unless I have to but right now it's just the marble texture set and some wood. I'm not to point of adding details to the linedefs anywhere yet so maybe that will help break it up but does anyone know which texture families fit really well for floors/pillars within the green marble set?

Share this post


Link to post

Q: I want to change how the colors appear when the player wields invulnerability. I'm guessing I would have to edit COLORMAP to do this. If so, what should I edit?

Share this post


Link to post

What's a good method for hiding outdoor secrets? I've got a hedge-maze going on, and I'd rather not have the secrets visible on the automap. The walls are lower than the ceiling, and I can't really change that to my knowledge. Something I did do was tick the "hide" box on the linedefs that surround the secret, so you don't instantly see the blue box defining the secret when you step outside. This works better than nothing, but you can see gaps in the automap if you pay enough attention.

Here's a quick example (I'm standing directly in front of the secret. Map is WIP so ignore the visuals, please):

Share this post


Link to post
Voros said:

Q: I want to change how the colors appear when the player wields invulnerability. I'm guessing I would have to edit COLORMAP to do this. If so, what should I edit?

The next-to-last row.

Note that it won't work in ZDoom anyway.

Share this post


Link to post
Agentbromsnor said:

I'm trying to wrap my head around crouching in ZDoom. The ZDoom wiki doesn't give any clear example on how to define player crouching sprites, so could somebody perhaps explain to me how it works?

So the syntax goes like "Player.CrouchSprite sprite", but what does the "sprite" slot exactly require? Can I actually only define one sprite name in there? How can I create animated crouching sprites this way?

You don't define the crouching animation anywhere, it's generated automatically to completely match the normal non-crouching animation, except using the sprite name that you define in Player.CrouchSprite in every frame instead of the sprite name used in your normal non-crouching animations. The engine also automatically manages jumps between the normal and crouching animations as the player crouches and stands up in real time. As a modder, you can't influence the behavior of the crouching animation.

Sick Bow said:

Something I did do was tick the "hide" box on the linedefs that surround the secret, so you don't instantly see the blue box defining the secret when you step outside. This works better than nothing, but you can see gaps in the automap if you pay enough attention.

You can use the "Hidden" flag to hide linedefs from being seen on the automap, the "Shown" flag to make linedefs on the automap behave as if the player has already seen them even if he didn't, or the "Secret" flag to make linedefs on the automap appear in the color of 1-sided walls even though they're 2-sided AND make them visible despite no height difference between the sectors on their sides (which the "Shown" flag actually doesn't do).

I'm not sure why you're dissatisfied with your result. What would you like to appear in place of those gaps, other than gaps? If some "fake" maze that actually isn't there, you might make it out of lines with the "Secret" flag, with these lines only existing to confuse the player.

Share this post


Link to post

In relation to COLORMAP, how would I go with changing the colors during invulnerability by using this python script to automatically produce a COLORMAP with my changes? I know Ling did it before, but he didn't seem to touch the invulnerability part, just the darken_color part IIRC.

Share this post


Link to post

Here's the part that adds the invuln map.

# Inverse color map for invulnerability effect.
inverse_colors = invert_colors(palette)
output_colormap(generate_colormap(inverse_colors, palette))
So you've got to change the invert_colors() function; or replace it with another.
def invert_colors(colors):
	"""Given a list of colors, translate them to inverted monochrome."""
	result = []

	for color in colors:
		average = (color[0] + color[1] + color[2]) // 3
		inverse = 255 - average

		result.append((inverse, inverse, inverse))

	return result

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
×