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.
Trigger when falling through a 3d floor?
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.
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.
-
-
- 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?
You could use GetActorFloorZ and test the floor height, for example
or perhaps use a sector action like Eyes Go Below Fake Floor
Code: Select all
script 2 (void)
{
if (GetActorFloorZ (0) >= 128)
{
if (lineside() == LINE_FRONT)
{
==> place action here <==
}
}
}
-
- Posts: 753
- Joined: Tue Jul 15, 2003 3:37 pm
Re: Trigger when falling through a 3d floor?
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.