The "How do I..." Thread

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.
User avatar
Yholl
Posts: 1955
Joined: Mon Dec 17, 2012 11:08 am
Location: Here, stupid.

Re: The "How do I..." Thread

Post by Yholl »

zrrion the insect wrote:Darn. I have a weapon (tagged fists) that, when given a dagger, I'd like to change the tag to dagger, and I was hoping to avoid having to split it into two weapons.
Maybe just tag it as something more generic, like Melee, or Close Combat? It'd be better than splitting the weapon just to have a different tag IMO.
User avatar
Sandro
Posts: 183
Joined: Sat Oct 05, 2013 8:03 am
Location: Erathia

Re: The "How do I..." Thread

Post by Sandro »

How do I change the texture of a single linedef ? I have a switch texture on a 3D floor, and when you activate the front linedef where the 3D floor is supposed to be, it activates a script that lowers a floor (basic trap to let monsters teleport in the room) but since it won't change the switch texture by itself, I need to do it in the script.
Unfortunately, SetLineTexture does not change the texture for a single linedef, but for all. Is there a way for a single line ?
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: The "How do I..." Thread

Post by cocka »

No, you're wrong. You've mixed up setlinetexture with the [wiki]ReplaceTextures[/wiki] function.
Is there a way for a single line ?
Yes, there is. You can set lineid for just one single line as well.
it activates a script that lowers a floor (basic trap to let monsters teleport in the room)
If you use at least hexen format why do you need to put the monsters to be teleported behind a wall(s) and wait for that wall(s) to lower?

[wiki]Thing_Spawn[/wiki] or [wiki]SpawnSpot[/wiki] do the job for you. There is no need to create rooms containing bunch of monsters awaiting you.
User avatar
xenoxols
Posts: 2134
Joined: Mon Mar 18, 2013 6:08 pm
Preferred Pronouns: She/Her
Location: Behind you

Re: The "How do I..." Thread

Post by xenoxols »

Is there a way to force ALL enemy projectile to not have vertical autoaim without redefining everyone?
EDIT: Actually, is there even a way to do it with replacing enemy projectiles?
User avatar
Sandro
Posts: 183
Joined: Sat Oct 05, 2013 8:03 am
Location: Erathia

Re: The "How do I..." Thread

Post by Sandro »

cocka wrote:No, you're wrong. You've mixed up setlinetexture with the [wiki]ReplaceTextures[/wiki] function.
Oh, my bad. Thank you !
If you use at least hexen format why do you need to put the monsters to be teleported behind a wall(s) and wait for that wall(s) to lower?
[wiki]Thing_Spawn[/wiki] or [wiki]SpawnSpot[/wiki] do the job for you. There is no need to create rooms containing bunch of monsters awaiting you.
Because :
- I'm familiar with this method, and I find it less messy.
- Monster count is affected by these actions, if I remember correctly.
I'm using UDMF, but as I'm making a "regular" doom map (= survival), there is no need to use advanced features. :wink:

Another question : I have a hexagon sector which activates a script when you enter it, whatever line you crossed. But I want this action to be not repetitive. (= after the script is executed once, nothing happens anymore if you cross another line of the sector)
Ah, I guess it's time to mess around with advanced stuff, as I totally ignore how to do it... :?
User avatar
Caligari87
Admin
Posts: 6236
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: The "How do I..." Thread

Post by Caligari87 »

You'll need to add some sort of global variable like "AlreadyRun" and have the script check that first. If the variable is false, run the script and set the variable to true, else kill the script. Should be fairly straightforward.

8-)
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: The "How do I..." Thread

Post by cocka »

I find it less messy.
Now, let's see what is messier.

This one was built in vanilla doom format:

https://drive.google.com/file/d/0B97Can ... sp=sharing

But this one is built in udmf format:

https://drive.google.com/file/d/0B97Can ... sp=sharing

I think the first one is much more messier than the second one.
I'm using UDMF, but as I'm making a "regular" doom map (= survival), there is no need to use advanced features.
Why do people use UDMF for just a regular doom map?! :shock: Moreover, you don't need the advanced features, then why is it important to use UDMF?!
But I want this action to be not repetitive.
The solution is already in the Hexen Deathkings of the Dark Citadel's first map. MAP41

You need just a map variable and an if condition:

Code: Select all

bool crossed = false;
script 1 (void)
{
if(!crossed)
{
crossed = true;
// do something here;
}
}
Last edited by cocka on Mon Jun 16, 2014 11:18 am, edited 1 time in total.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: The "How do I..." Thread

Post by cocka »

But in this case the script would always test whether the variable is true or false when you cross a line. Therefore you can also remove the action special from the line.

All you have to do is to EXPLOIT the features of UDMF. How? Just set lineids for all those lines with the script above and write an additional line into your script.

After

Code: Select all

// do something here;
you can use this:

Code: Select all

setlinespecial(yourlineid, 0);
User avatar
Ravick
Posts: 2051
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: The "How do I..." Thread

Post by Ravick »

How do I limit the mx number of a certain type/specie of actor in the map, like the vanilla's Lost Soul limit of 20 per map?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: The "How do I..." Thread

Post by Gez »

There isn't a lost soul limit of 20 per map. Make a vanilla Doom map with 600 lost souls in it, they'll all be there.

What there is a limit to is to lost soul spawning by pain elemental, if there are already more than 20 lost souls in the map. So a pain elemental may spawn a 21st lost soul, and then nothing else until some of the lost souls are killed.

So it's important to keep that in mind: there's no limit to how many monsters there can be, there's just a limit built-in a spawn function. If you want to do the same thing, use ACS and Thing_Count.
User avatar
Ravick
Posts: 2051
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: The "How do I..." Thread

Post by Ravick »

I'll do that then. Thanks. :)

___

How do I change the stock maps lights, like in Lasting Light mod?
User avatar
kodi
 
 
Posts: 1361
Joined: Mon May 06, 2013 8:02 am

Re: The "How do I..." Thread

Post by kodi »

Brutal doom has floor decals for blood splatter. How is that accomplished?
User avatar
phantombeta
Posts: 2182
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: The "How do I..." Thread

Post by phantombeta »

It's made using actors with models and voxels assigned to the sprites.
User avatar
Sandro
Posts: 183
Joined: Sat Oct 05, 2013 8:03 am
Location: Erathia

Re: The "How do I..." Thread

Post by Sandro »

cocka wrote:Now, let's see what is messier.
This one was built in vanilla doom format:
https://drive.google.com/file/d/0B97Can ... sp=sharing
But this one is built in udmf format:
https://drive.google.com/file/d/0B97Can ... sp=sharing
I think the first one is much more messier than the second one.
I have to disagree. :P
As I said, I'm familiar with regular mapping. I prefer to see where I'm going directly on the screen, rather than take a look at scripts I'm not familiar with. Moreover, what about skills/cooperative settings ? I really don't know if it possible, but if so, are you sure it would be less messy, or at least less difficult ?
Besides, my second argument is still relevant. (=> monster count doesn't show correctly)
cocka wrote:Why do people use UDMF for just a regular doom map?! :shock: Moreover, you don't need the advanced features, then why is it important to use UDMF?!
I have to say I'm surprised by your reaction. I thought other formats were obsolete...
Spoiler:
So yeah, I'm using GZDB which is the best editor in my opinion, or at least for my use. Furthermore, UDMF offers much more possibilities and have much more features that can be useful, even for a regular doom map. :wink:
(my bad if by "regular" you understood "vanilla")
cocka wrote:The solution is already in the Hexen Deathkings of the Dark Citadel's first map. MAP41
You need just a map variable and an if condition:
Oh, I have never tried Hexen.
But thank you very much for your help, it works !!! :D
User avatar
kodi
 
 
Posts: 1361
Joined: Mon May 06, 2013 8:02 am

Re: The "How do I..." Thread

Post by kodi »

phantombeta wrote:It's made using actors with models and voxels assigned to the sprites.
I can understand flat plane models textured with blood, but why voxels for flat objects?
Locked

Return to “Editing (Archive)”