Trigger when falling through a 3d floor?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
User avatar
Hipshot
Posts: 50
Joined: Wed Feb 03, 2016 1:45 pm

Trigger when falling through a 3d floor?

Post by Hipshot »

I asked this over at DW, but I figure I might as this here too, seems a bit complicated? The question there was phrased a bit different though. Anyway...

Is it possible to trigger an action 80 when I fall through a 3d floor, the scenario is that I jump down a hole and on the way I want to trigger a few things from ACS. Triggering on 3dfloors works as long as they are solid, but now we are talking about a non-solid non-opaque "volume" more or less.
User avatar
Kappes Buur
 
 
Posts: 4149
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada

Re: Trigger when falling through a 3d floor?

Post by Kappes Buur »

You could use GetActorFloorZ and test the floor height, for example

Code: Select all

script 2 (void)
{
   if (GetActorFloorZ (0) >= 128)
      {
         if (lineside() == LINE_FRONT)
         {
	  ==> place action here <==
         }
      }
}
or perhaps use a sector action like Eyes Go Below Fake Floor
boris
Posts: 753
Joined: Tue Jul 15, 2003 3:37 pm

Re: Trigger when falling through a 3d floor?

Post by boris »

GetActorFloorZ returns a fixed point number, so you have to compare it to a fixed point number, in this example you'd have to write 128.0 instead of 128.

Return to “Mapping”