Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

Zdoom specific questions

Recommended Posts


I’m working in a zdoom mini espisode, and I’d like to implement some special effects.

Does someone know how to..

-Make monsters that attack other creatures, except the player, I heard about the “thing hate factor”, or something like that, but I have no idea how and where select it (does it need scripts?).

-Make mirrors

-Make monsters that move from a predetermined path, but attack the player when they see him

-The same, but with no attack, even if they get hurt

-sectors with coloured lights

Share this post

Link to post

ok, well zdoom.notgod seems to be down, I'll give links as soon as it's back.

1-I don't know.

2-set the line to "LineMirror" and make sure there is a large void space behind it. In fact, this void space should be equal to or bigger than the maximum distance that the player can see the mirror from.
more on mirrors...

3-info on patrol routes
4-I don't know.

5-insert a script like the following:

script 1 OPEN
    Sector_SetColor(sectortag, red amount, green amount, blue amount);
OR, if your not a scripting person (which you should be), put a 2-sided line at the start of the level, and make sure the player has to cross it to continue. Make this line "Sector_Setcolor", and put in the variables and stuff. Now when the player crosses this line, colored sectors will come on. However, if you want other sectors to have other colors, you'll have to make another line.
more on colored lighting

EDIT: added helpful links...

Share this post

Link to post

Thing_Hate is used in scripts like this

Thing_Hate (hater, hatee, type);

So to make monsters with tid 1, hate monsters with tid 2, hunt them down and ignore the player (see hate types below) you'd use

Thing_Hate (1, 2, 6);

Here's what Randy Heit said about the hate types...

I just got done enhancing Thing_Hate with a third parameter you can set like this:

0. Same behavior as before.

1. Monsters work like normal, except instead of looking for players, they look for monsters with the TID they're supposed to hate. They won't go after a monster unless they can see it first. After finishing off one monster, they look for more with the same TID. If they can't find any, they go back to sleep. They will ignore you unless you attack them, in which case they will target you like normal.

2. Same as 1, except they will chase after other monsters without needing to see them first.

3 - Hunt actors with given TID and also players

4 - Same as 3, but will go after monsters without seeing them first

5 - Hate actors with given TID and ignore player attacks

6 - Same as 5, but will go after enemies without seeing them first

There is another way to do coloured sector lighting without using a script. This is used to set coloured lighting at level startup, without needing to be activated by the player. I have no idea if you can then change the lighting colour later on. I suspect not.

This method seems to be little known, and I don't even think it is in the docs. However, if you make a basic Zdoom level with coloured lighting, and then convert it to a ZdoomHexen format level using Zwadconv, it uses this method, as can anyone who wants to use it directly for a Zdoomhexen map in their editor.

Make a line a type 190. This can be a single sided line facing into the sector you are changing. In fact, that is probably most convenient.

Tag the line to the sector you want the light to be different in.

Make the first arg of the line 1. I think this is needed to tell Zdoom you are affecting lighting. Randy said he couldn't remember for definite, but he thought other values might affect gravity instead.

Thats all you do to the line type - a type 190, tag whatever, arg1 1

Next edit your line. Instead of putting a texture name on the upper side def, use a HEX number of the colour of light you want in the format RRGGBB. So FF0000 would be red 00FF00 would be green, etc.

Once it's all set up, go play your level. All sectors tagged to the line will have coloured lighting of whatever colour you picked.

Share this post

Link to post
Enjay said:

Tag the line to the sector you want the light to be different in.

Make the first arg of the line 1.

Wait, if the first arg is 1, then where do you put the sector tag? Arg 2?

Share this post

Link to post
Epyo said:

Wait, if the first arg is 1, then where do you put the sector tag? Arg 2?

Maybe just a bit of confusion in terminology.

I usually to refer to line types as having a tag first, and then arg1, arg2, arg3 etc, but I suppose, the tag really is arg1.

So um yeah

line type = 190

tag = sector tag

first free arg that isn't the sector tag = 1

Upper side def = Hex number for colour

Anyway, like I said, it's a little known feature, but try it, it works. It's a nice, easy way to set up a nothin' fancy coloured sector without a script.

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
Sign in to follow this