Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
mikenet2007

Make a wall blockable only from one direction?

Recommended Posts

I want an invisible wall (a middle wall) that you can walk into but not back out of. It's passable going in but not back out.

If that's not possible, perhaps theirs a way to do it with invisible sprites? If not an alternative would be to make it to where the player cant move for a short amount of time.

I need one of these tricks to force a player down a hole that could normally be run over if your going fast enough. I can't make the hole sector any wider to prevent the player from running or jumping across. So I need a the player stuck in that sector long enough to fall down.

Share this post


Link to post
Foxpup said:

Why not just make the sector on the other side of the hole too high to reach?


That wouldn't work, the hole is a square in the middle of a sector that can be accessed from any direction.

This is going to be a trap actually, the ground will look level and normal until the player picks up a blue card, then a script goes off that lowers the small square sector around the key. With the way I have it designed their is no way to make the sector surrounding the key wider or taller on one end. It's hard to explain.

Share this post


Link to post

ACS scripting to the rescue, if you are making the map for ZDoom.

Make a pit, maybe -256 deep with linedefs on the inside, such as this,
and attach a script to those linedefs, with walk-over trigger:



As soon as the player hits the linedef, he stops dead in his track and
drops into the pit, then reactivates. The delay is so short that the
other lines have very little affect on the player's movement.

Share this post


Link to post

Nice that looks like it will be just what I need, I'll test it out probably tonight sometime when I get off work. Would I replace "playernumber" with 1 for player 1 or leave the script as is. Also does the script require an extra thing in the sector or is the player the only thing needed?

PS

Didn't remember you were on this site, I figured id post here sometimes to break up the questions on the other site so their isn't back to back post. I've had a lot to do in a short amount of time. :p

Share this post


Link to post
mikenet2007 said:

Would I replace "playernumber" with 1 for player 1 or leave the script as is.
Also does the script require an extra thing in the sector or is the player the only thing needed?


The player is the only thing needed.

Leave PlayerNumber() as is.

The engine will automatically identify which player has activated the script.
For example, when the game starts, Player1 has TID 0. After running the above
line, Player1 will have TID 1000.

To change the TID for Player2, Player3, etc you plug in the appropriate value
in the above line:

Thing_ChangeTID(0, 1000 + PlayerNumber()); // change Player1 TID from 0 to 1000
Thing_ChangeTID(1, 1000 + PlayerNumber()); // change Player2 TID from 1 to 1001
Thing_ChangeTID(2, 1000 + PlayerNumber()); // change Player3 TID from 2 to 1002
:
:
Thing_ChangeTID(7, 1000 + PlayerNumber()); // change Player8 TID from 7 to 1007


See also
http://zdoom.org/wiki/PlayerNumber
http://zdoom.org/wiki/Category:ACS_Information_functions

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
×