Trying to make a line block walking enemies only.

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.
Locked
User avatar
Enjay
 
 
Posts: 27149
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Trying to make a line block walking enemies only.

Post by Enjay »

I want to make an area that flying enemies can enter but walking ones can't (it's a trap minefield). I'm using:

Code: Select all

Line_SetBlocking (7, BLOCKF_MONSTERS, BLOCKF_FLOATERS);
In a script to try and set "block moonsters" and unset "block floaters" but all types of enemies continue to be blocked by the lines in question. This is with the line having no blocking properties before the script runs. I have also tried setting the line to block monsters in the editor but then running:

Code: Select all

Line_SetBlocking (7, 0, BLOCKF_FLOATERS);
However, again, all monsters are blocked.

All the floating enemies have been given the +FLOAT flag.

Is there any way to do what I want?

[edit]
I have now also tried:

Code: Select all

    Line_SetBlocking (7, BLOCKF_MONSTERS, 0);
    Line_SetBlocking (7, 0, BLOCKF_FLOATERS);
Still no joy. :(

I'm guessing that being a monster is given a higher priority than being a floater when checking whether the actor should be blocked or not?
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: Trying to make a line block walking enemies only.

Post by edward850 »

Your issue is in-fact a simple logic problem: All flying monsters are still monsters, but not all monsters can fly. This is no specific case for Non-flying monsters.
Without seeing the map in question, would making an invisible railing the walking enemies cannot step over work?
User avatar
Enjay
 
 
Posts: 27149
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Trying to make a line block walking enemies only.

Post by Enjay »

Unfortunately, that mapping solution wouldn't work. The area is supposed to be open and look fully accessible. To the player it is fully open because he has to cross the minefield. Walking enemies, however, are supposed to give the impression that they won't cross the minefield and risk setting off the mines. Flying enemies should be able to cross because they will fly over the mines and won't set them off. It looks logical for the walking enemies to stop at the edge of the minefield but flying enemies look odd bouncing off an invisible barrier even if they are well above ground level and it sort of gives the whole game away about how things are working (ie that the monsters are all blocked by a line). I suppose that I could put a fence that the player could jump over but that would be inconsistent with other fences in the same map where they block the player.

I guess some sort of ACS trickery to get the z height of an actor might work but it's more involved than I would rather make this.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Trying to make a line block walking enemies only.

Post by Gez »

What if you surround the field with a thin chasm? Players would walk across it without noticing it, but monsters might be blocked by the dropoff despite not being affected if they actually did try to cross it.

You can hide the chasm with a non-solid but opaque 3D floor, or an old fashioned deep water trick.
User avatar
Enjay
 
 
Posts: 27149
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Trying to make a line block walking enemies only.

Post by Enjay »

Oooh, that's quite cunning. I'll give that a go when I get a chance.


[edit] aaaannnndddd...

It works perfectly. Thank you very much. :D [/edit]
Locked

Return to “Editing (Archive)”