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

Make line passable

Question

How should I make I line that is impassable to be passable by scripting? Do I have to "Set line identification" first? Or can I just give the line a tag (ZDoom) and use Line_SetBlocking? If so, what should I write? Line_SetBlocking([tag], ???, ???);  can't make it work, I feel a little lost.

Share this post


Link to post

7 answers to this question

Recommended Posts

  • 0

How to set up the line depends on the map format.

 

In UDMF you can set the line's tag directly in the editor. In Hexen format you have to use Line_SetIdentification because there is no dedicated field for it.

In the script you can then call Line_SetBlocking - this part is identical for both map formats.

 

Share this post


Link to post
  • 0

One thing I've wondered is does Line_SetBlocking successfully remove the Impassible flag? I've never tried actually since I always do Block player and then remove the player flag from it with Line_SetBlocking. Do you have to use BLOCKF_EVERYTHING?

Share this post


Link to post
  • 0

Line_SetBlocking operates on a per-flag basis. BLOCKF_CREATURES and BLOCKF_EVERYTHING are two separate flags. To make sure both are clear, pass both if you are unsure what may be set on a line. If both are set and you only clear one, the other will still have an effect.

 

 

Share this post


Link to post
  • 0
4 hours ago, Graf Zahl said:

 

In the script you can then call Line_SetBlocking - this part is identical for both map formats.

 

Thank you!

Then what chould I write at "setflags" and "clearflags"?

Share this post


Link to post
  • 0

'setflags' is the combined value you want to set, 'clearflags' the combined value of the flag you want to clear.

So for 'setflags', pass 0, for 'clearflags' BLOCKF_CREATURES|BLOCKF_EVERYTHING.

Share this post


Link to post
  • 0
9 hours ago, Graf Zahl said:

 

So for 'setflags', pass 0, for 'clearflags' BLOCKF_CREATURES|BLOCKF_EVERYTHING.

I set it up like this:

Line_SetBlocking(1,0,BLOCKF_EVERYTHING);

That did not work. I am still not sure what you mean.

Share this post


Link to post
  • 0
12 hours ago, Nevander said:

 I always do Block player and then remove the player flag from it with Line_SetBlocking.

That worked for me as well. Thank you!

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
×