[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: 788
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

Re: [ZScript] 3D Platform Actor (v1.1.0)

Post by Fishytza »

Ok, so one thing I'm noticing is @ 1:14 when a cube tries to move but can't because of the 3D floor interaction, and when it finally gets going it loses one of its passengers. I'll try to do something about that.

@ 9:12 upper-left cube with the revenant and 3 zombies. I don't know why one of the zombies just falls off as the cube starts moving away. It's a mystery... :?

Just a general thing, having solid decorations like torches and candelabras on the edges of those pillars can and will mess up how actors get on/off the cubes, or block those cubes entirely. (Which is more obvious if the cubes have 0 crush damage)
Because the cube gets blocked by a monster which in turn is pushed against a solid torch.
User avatar
Fishytza
Posts: 788
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

Re: [ZScript] 3D Platform Actor (v1.1.0)

Post by Fishytza »

doomzie wrote: Fri Aug 26, 2022 2:41 pm [youtube]https://youtu.be/ry5AEbSWP6w[/youtube] (HD is still processing)
I'm curious about something. Does that mod with the D2016 monsters use extra actors as headshot hitboxes per chance?

I'd be great if you could link the mod.

EDIT: I don't think I'll crack the falling passengers bug by tomorrow, especially not the kind I'm seeing in the video. Oh well.
doomzie
Posts: 94
Joined: Sat Apr 30, 2022 4:26 am

Re: [ZScript] 3D Platform Actor (v1.1.0)

Post by doomzie »

FishyClockwork wrote: Sat Aug 27, 2022 10:49 am
doomzie wrote: Fri Aug 26, 2022 2:41 pm [youtube]https://youtu.be/ry5AEbSWP6w[/youtube] (HD is still processing)
I'm curious about something. Does that mod with the D2016 monsters use extra actors as headshot hitboxes per chance?

I'd be great if you could link the mod.

EDIT: I don't think I'll crack the falling passengers bug by tomorrow, especially not the kind I'm seeing in the video. Oh well.
EOA zdoom.org topic:
viewtopic.php?t=68111
https://github.com/DoomKrakken/Embers-Of-Armageddon

EOA moddb page:
https://www.moddb.com/mods/embers-of-ar ... armageddon

Doom 2016 monsters add-on:
https://www.moddb.com/mods/embers-of-ar ... oa-version

Load in this order: EOA Assets, EOA Code, Doom 2016 monsters (if you would want to test).

I've checked "EOA Code" and I see some "headshot" references. Not sure if there's anything in the Doom 2016 monsters DECORATE.
User avatar
Fishytza
Posts: 788
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

Re: [ZScript] 3D Platform Actor (v1.1.0)

Post by Fishytza »

Ok, I got some good news/bad news depending on how you want to interpret it.

Just loading the base EOA mod without the D2016 monsters causes one of my platforms in TEST01 to not move at all.
That's because of those EOA_WeakPoint actors used as headshot hitboxes.

When a platform tries to move a whole group of actors, all those actors are temporarily non-solid (by being excluded from the blockmap) so they don't collide with each other when moved one by one.
Since the weakpoint actors won't be detected as passengers they won't get this treatment so they remain solid and what ends up happening is either the passengers or the platform get stuck.

I need some time to think about how best to handle this, the release is likely gonna have to wait until tomorrow (Monday).

EDIT: And I've managed to reproduce the condition where a passenger simply "won't move" and be left behind by a platform. And yes, it's because of EOA.
doomzie
Posts: 94
Joined: Sat Apr 30, 2022 4:26 am

Re: [ZScript] 3D Platform Actor (v1.1.0)

Post by doomzie »

FishyClockwork wrote: Sun Aug 28, 2022 2:38 am Ok, I got some good news/bad news depending on how you want to interpret it.

Just loading the base EOA mod without the D2016 monsters causes one of my platforms in TEST01 to not move at all.
That's because of those EOA_WeakPoint actors used as headshot hitboxes.

When a platform tries to move a whole group of actors, all those actors are temporarily non-solid (by being excluded from the blockmap) so they don't collide with each other when moved one by one.
Since the weakpoint actors won't be detected as passengers they won't get this treatment so they remain solid and what ends up happening is either the passengers or the platform get stuck.

I need some time to think about how best to handle this, the release is likely gonna have to wait until tomorrow (Monday).

EDIT: And I've managed to reproduce the condition where a passenger simply "won't move" and be left behind by a platform. And yes, it's because of EOA.
It's good news that it clarifies what is going on. I'm pleased to hear you understand what is going on.

Since your remark, browsing through the EOA code for headshot stuff and sort of knowing how that works (2 actors/hitboxes) I realized it was probably a source of problems for 3D Platform. The 'staggering' code is probably a little nifty too when it comes to 3D platforms. It's totally okay if you not deal with it at all. I'm really sorry for the trouble it has caused you.

Knowing this, I should make the time to make a clean pure vanilla level and assess 3D Platform as such. I'll record it too.

Currently distracted with some advanced model and texture complexities.
User avatar
Fishytza
Posts: 788
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

Re: [ZScript] 3D Platform Actor (v1.1.0)

Post by Fishytza »

doomzie wrote: Sun Aug 28, 2022 8:48 am It's totally okay if you not deal with it at all. I'm really sorry for the trouble it has caused you.
Eh, it's the headache that comes when you try to combine mods that aren't exactly compatible with one another.

For platforms, I'm thinking of adding some empty virtual functions for cases as such as this one, when dealing with non-generic actors. Right now, there's two such functions in the repo and I'm thinking of adding a third.
doomzie
Posts: 94
Joined: Sat Apr 30, 2022 4:26 am

Re: [ZScript] 3D Platform Actor (v1.1.0)

Post by doomzie »

It's probably not possible, but I just wanna know, is there any way to trigger an action (a script) when the player steps/lands onto a 3D Platform?

It would be really great to have.
User avatar
Fishytza
Posts: 788
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

Re: [ZScript] 3D Platform Actor (v1.1.0)

Post by Fishytza »

I'll try to implement that tomorrow. It shouldn't be that difficult. (I take it back.) It actually might get really tricky if what you want is to trigger a special every time something lands on a platform, even an idle platform.


Ok, I've added a third empty virtual function that allows you to handle special actors as they are detected in a BlockThingsIterator search. And with it I've managed to get around the EOA_WeakPoint actors.
Those actors always make themselves solid if their owner is solid which works for us just fine.
All we have to do is clear its bSolid flag so it doesn't get in the way of other passengers.

Fetch the last commit, and then either find the function SpecialBTIActor and fill it out
or make a subclass of FCW_Platform and override it, like so

Code: Select all

override bool SpecialBTIActor (Actor mo)
{
	if (mo.GetClassName() == "EOA_WeakPoint")
	{
		mo.bSolid = false;
		return true;
	}
	return false;
}
and test it out with your map. Granted, this isn't fool proof but I'm curious if it makes a difference with things falling off.

In my case, it solves the "passenger getting left behind" problem with one platform in TEST01, but another one still gets stuck half-way on its path. I'm gonna need to investigate that tomorrow.
doomzie
Posts: 94
Joined: Sat Apr 30, 2022 4:26 am

Re: [ZScript] 3D Platform Actor (v1.1.0)

Post by doomzie »

FishyClockwork wrote: Mon Aug 29, 2022 12:41 pm Ok, I've added a third empty virtual function that allows you to handle special actors as they are detected in a BlockThingsIterator search. And with it I've managed to get around the EOA_WeakPoint actors.
Those actors always make themselves solid if their owner is solid which works for us just fine.
All we have to do is clear its bSolid flag so it doesn't get in the way of other passengers.
Quick feedback:

I've done a quick 30 min test with the updated files and addition of the 'SpecialBTIActor' function for EOA.

At first glance it's a big difference. I think it solves some primary problem with EOA enemies. I'm very pleased with the result.

Over time, the number of fallen actors does still increase quite a bit, so I still need to do some further testing. I think most are falling off 'as expected', but need to look closer.

It certainly takes a lot more time to have a swarm of (fallen) enemies on the floor (in the water). The enemies stay on the platform much longer.

I'll get back on this this evening, probably.
User avatar
Fishytza
Posts: 788
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

Re: [ZScript] 3D Platform Actor (v1.1.1)

Post by Fishytza »

v1.1.1 release is out

To summarize what's changed since v1.1.0:
Spoiler:
----------------------------------
doomzie wrote: Tue Aug 30, 2022 6:59 am Quick feedback:

I've done a quick 30 min test with the updated files and addition of the 'SpecialBTIActor' function for EOA.

At first glance it's a big difference. I think it solves some primary problem with EOA enemies. I'm very pleased with the result.

Over time, the number of fallen actors does still increase quite a bit, so I still need to do some further testing. I think most are falling off 'as expected', but need to look closer.

It certainly takes a lot more time to have a swarm of (fallen) enemies on the floor (in the water). The enemies stay on the platform much longer.

I'll get back on this this evening, probably.
That's good news.


I'm sorry if this comes off as selfish or lazy, but the burnout and sleep deprivation are beginning to creep in again so I've decided to make the release now and take a break from this. At least for the next 5 days or so. Or longer, much longer.

I've added your "trigger special when landing on 3D platform" feature on the to-do list for when I come back to this.
doomzie
Posts: 94
Joined: Sat Apr 30, 2022 4:26 am

Re: [ZScript] 3D Platform Actor (v1.1.1)

Post by doomzie »

FishyClockwork wrote: Tue Aug 30, 2022 9:36 am v1.1.1 release is out
Congrats. Please take plenty rest. Thanks so much for all your efforts.
User avatar
Major Cooke
Posts: 8196
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: [ZScript] 3D Platform Actor (v1.1.0)

Post by Major Cooke »

FishyClockwork wrote: Fri Aug 12, 2022 6:48 amCooke, I'm still interested about what you have in mind with PlaneMoving().
Apologies, I had to take a break because of a massive heat wave. It killed any desire to want to do anything productive, but thankfully that's passed. Mostly...

First, have you already solved the issue then? If you have, then there's no need for me to elaborate, but I will put it in spoilers if you haven't gotten around to investigating it yet.
Spoiler: About PlaneMoving
User avatar
Fishytza
Posts: 788
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

Re: [ZScript] 3D Platform Actor (v1.1.1)

Post by Fishytza »

The issue has been taken care of, sort of. Platforms no longer clip thru moving 3D floors but move with them instead until the 3D floor is out of the way.
User avatar
Major Cooke
Posts: 8196
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: [ZScript] 3D Platform Actor (v1.1.1)

Post by Major Cooke »

What's left to address then?
User avatar
Fishytza
Posts: 788
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

Re: [ZScript] 3D Platform Actor (v1.1.1)

Post by Fishytza »

I guess nothing?

Return to “Script Library”