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

Question

So if i have a 3d floor above a non 3d floor and   place   linedef for player to walk over it doesn't recognize the line ontop 3d floor?

Share this post


Link to post

8 answers to this question

Recommended Posts

  • 0
8 minutes ago, egghead07 said:

So if i have a 3d floor above a non 3d floor and   place   linedef for player to walk over it doesn't recognize the line ontop 3d floor?

I'd check it out, tell me what you learn.

Share this post


Link to post
  • 0
10 hours ago, egghead07 said:

linedef for player to walk over it doesn't recognize the line ontop 3d floor?

linedefs are a 2D concept, heights are not checked when a player walks over them to trigger something.

 

If you need to trigger something on a specific 3D floor, it must be done another way, e.g. with an ACS script.

 

 

Share this post


Link to post
  • 0
1 hour ago, andrewj said:

linedefs are a 2D concept, heights are not checked when a player walks over them to trigger something.

 

If you need to trigger something on a specific 3D floor, it must be done another way, e.g. with an ACS script.

 

How about if the line you're walking over is part of a 3d sector and not just a single linedef? 

 

 

Share this post


Link to post
  • 0

As already mentioned, a walkover linedef spans the height of a sector.

What you can do, however, is use a function like GetActorFloorZ to specify

the z value of a floor as in this script utilizing a jumppad triggered on

a 128 high 3D floor, triggered from the front only

Quote

#include "zcommon.acs"

 

script 2 (void)
{
   if (GetActorFloorZ (0) >= 128)
      {
         if(lineside() == LINE_FRONT)
         {
              // 128:ThrustThingZ (tid, force, up=0/down=1, set/add);
            ThrustThingZ (0, 200, 0, 0);
         }
      }
}

 

 

Spoiler

R5pjb2r.png

 

 

 

 

Share this post


Link to post
  • 0
5 hours ago, Kappes Buur said:

 

Quote

#include "zcommon.acs"

 

script 2 (void)
{
   if (GetActorFloorZ (0) >= 128)
      {
         if(lineside() == LINE_FRONT)
         {
              // 128:ThrustThingZ (tid, force, up=0/down=1, set/add);
            ThrustThingZ (0, 200, 0, 0);
         }
      }
}

 

 

 

This code will not work as expected because GetActorFloorZ returns a fixed point value, so you have to compare it to fixed point values, in this case for example to 128.0.

Share this post


Link to post
  • 0

@boris

Do you mean

if (GetActorFloorZ (0) >= 128.0)

instead of

if (GetActorFloorZ (0) >= 128)

?

 

In my case, both work.

Share this post


Link to post
  • 0
12 minutes ago, Kappes Buur said:

@boris

Do you mean

if (GetActorFloorZ (0) >= 128.0)

instead of

if (GetActorFloorZ (0) >= 128)

?

 

In my case, both work.

 

128.0 is the correct way. Using just 128 will trigger the if statement's body when the player z position is higher than about 0.001953 map units.

Share this post


Link to post
  • 0
On 1/12/2024 at 1:51 AM, andrewj said:

linedefs are a 2D concept, heights are not checked when a player walks over them to trigger something.

 

If you need to trigger something on a specific 3D floor, it must be done another way, e.g. with an ACS script.

 

 

I cracked it! I placed a non 3d floor outside dummy sector then gave it same tag as 3d floor inside eg.5 then made them both have same floor ceiling heights and wala

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
×