[ZScript] 3D Platform Actor (v2.2c)

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
Fishytza
Posts: 790
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

Re: [ZScript] 3D Platform Actor (v2.2b)

Post by Fishytza »

Connorpo1221 wrote: Fri Sep 20, 2024 2:09 pm I tried to load a map01 in it and it says 3Dplatform v2.2b.pk3:zscript/fishy/platform-base.zs, line 432: Unable to resolve LinePortal as a type.
Change that line from:

Code: Select all

LinePortal port = level.linePortals[iPorts];
To:

Code: Select all

let port = level.linePortals[iPorts];
That error happens when the zscript version is 4.12

Actually at the moment there are a few commits ahead of the latest release. That bug has been fixed in one of them.
User avatar
Fishytza
Posts: 790
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

Re: [ZScript] 3D Platform Actor (v2.2c)

Post by Fishytza »

This is a minor bugfix/patch release.
https://github.com/FishyClock/3Dplatfor ... /tag/v2.2c

(This release now works with zscript version "4.12" among a few very minor fixes.)
ginc
Posts: 9
Joined: Mon Jun 28, 2021 9:44 am

Re: [ZScript] 3D Platform Actor (v2.2c)

Post by ginc »

So I'm messing around with this library, hoping to make use of it in my next map. Its really impressive and has massive potential for a platforming-themed WAD (Golden Souls 3 maybe?)

One thing I've noticed while testing is that setting the compatibility flag compat_crossdropoff to true (default is false) makes it so that active monsters will walk off moving platforms.

compat_crossdropoff is a weirdly named flag that seems to do the opposite of what its name is, but basically I've got it set on my project to prevent monsters like Archviles from being pushed off ledges by SSG blasts and rockets. At least MAPINFO allows you to set these flags for each map, so I can set it back to default for my Fishy platform map.
User avatar
Fishytza
Posts: 790
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

Re: [ZScript] 3D Platform Actor (v2.2c)

Post by Fishytza »

I've fixed the compat_crossdropoff issue with a little hack. I've made a few commits to the repo today.

Have a testbuild and please tell me if the issue is resolved on your end?
https://www.dropbox.com/scl/fi/ytqzqtu2 ... p6vxw&dl=1
ginc
Posts: 9
Joined: Mon Jun 28, 2021 9:44 am

Re: [ZScript] 3D Platform Actor (v2.2c)

Post by ginc »

Fishytza wrote: Tue Apr 08, 2025 9:34 am I've fixed the compat_crossdropoff issue with a little hack. I've made a few commits to the repo today.

Have a testbuild and please tell me if the issue is resolved on your end?
https://www.dropbox.com/scl/fi/ytqzqtu2 ... p6vxw&dl=1
That build fixed the issue on my end, thanks for the quick response!

I did come across one other issue, but this is more of a cross-mod compatibility thing and probably isn't in-scope to fix on your end.
Basically, some mods have monster death animations (DECORATE or ZScript) with frames that loop until A_CheckFloor is true. It simulates stuff like falling and having the death animation restart when hitting the ground. Supercharge has this, and Brutal Doom probably does too.
The issue is that A_CheckFloor can only return true for sector floors, not actors (ie. 3d platforms)... so monsters can get stuck in a loop and not finish their Death state. Not only does this look silly, but Archviles can't resurrect things that haven't "finished" dying.

The workaround for this is for mods to use the A_CheckSolidFooting custom function instead of A_CheckFloor, but this might be ZScript-only.
User avatar
Fishytza
Posts: 790
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

Re: [ZScript] 3D Platform Actor (v2.2c)

Post by Fishytza »

Just wanted to give an explanation.

Alright, so the problem is that A_CheckFloor checks the calling actor's floorz value to see if it goes below the current sector's floor or below the lower 3D floor. (As far as I can tell "floorz" never takes into account actors below other actors.)
I don't feel comfortable trying to hack around this by messing with a passenger's floorz value just to trick A_CheckFloor to do the state jump. (I've tried; I can't get it to work without messing up other things.) And at this moment in time there is no way to even detect if the passenger is going to call A_CheckFloor so I can't reliably intercept it.

And besides, checking the passenger's floorz is already done as part of the passenger management logic.
It checks if the passenger's floorz is above the platform's top. (The "top" is its Z position + its height.)
And if it is, it's assumed there must be a 3D floor above the platform - meaning the passenger should be ignored/not moved by the platform.
This kind of check is done repeatedly for each new/current passenger per tic so that I don't have to rely on functions like NextLowestFloorAt. Because it would make it more expensive.

One day I'd probably need to restructure some or all of the code, but not right now.

Return to “Script Library”