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

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.
doomzie
Posts: 94
Joined: Sat Apr 30, 2022 4:26 am

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

Post by doomzie »

Edit: Deleted question. Found the cause.
User avatar
Fishytza
Posts: 783
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

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

Post by Fishytza »

doomzie wrote: Tue Mar 14, 2023 12:20 pmSound Code:
Try this:

Code: Select all

SNDSEQ:

:TrainMenace
	playrepeat	TrainMenace
end
SNDSEQ entries want what you defined in SNDINFO, not the sound file itself.


doomzie wrote: Tue Mar 14, 2023 12:20 pm However, I can't tell how you can set the Next Interpolation Point property of an Interpolation Point through ACS?
You can't.


doomzie wrote: Tue Mar 14, 2023 12:20 pm could the ACS functions be expanded to include SetNextPoint() for the "Platform Interpolation Point" class?
I'm not adding any more features at the moment and the foreseeable future. Unless there are bugs to fix or code to refactor I'm putting this project on the backburner for now.


doomzie wrote: Tue Mar 14, 2023 1:02 pm 2. "Player bumps into the platform" (collides with the side of the platform)
BUMPSPECIAL should trigger that too.


doomzie wrote: Tue Mar 14, 2023 2:23 pm Something else that I don't fully get is, what's the cause for the "MODL" Sprite to show up on a 3DP actor (model displays, but the sprite also). :-/
All I can see is that it's an .md3 with texture baked in?, so it's not using the Skin property. Maybe that makes the sprite show up?
I've never encountered that problem.
I am sorry, but my experience with models and MODELDEF is limited to exporting map geometry as .obj files.
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 Mar 14, 2023 2:49 pm
doomzie wrote: Tue Mar 14, 2023 12:20 pmSound Code:
Try this:

Code: Select all

SNDSEQ:

:TrainMenace
	playrepeat	TrainMenace
end
SNDSEQ entries want what you defined in SNDINFO, not the sound file itself.
Ok, that didn't resolve it.
FishyClockwork wrote: Tue Mar 14, 2023 2:49 pm
doomzie wrote: Tue Mar 14, 2023 12:20 pm However, I can't tell how you can set the Next Interpolation Point property of an Interpolation Point through ACS?
You can't.
Ok, as a conclusion then, dynamic paths are not possible with IPs. Important to understand for editors that you need to predefine the whole path with IPs.
You can do dynamic linear paths with XYZ relative movement (with one reference map spot for example) though, but then you can't spline the platform movement.
FishyClockwork wrote: Tue Mar 14, 2023 2:49 pm
doomzie wrote: Tue Mar 14, 2023 12:20 pm could the ACS functions be expanded to include SetNextPoint() for the "Platform Interpolation Point" class?
I'm not adding any more features at the moment and the foreseeable future. Unless there are bugs to fix or code to refactor I'm putting this project on the backburner for now.
Ok, very well sir, thank you so much for everything.
FishyClockwork wrote: Tue Mar 14, 2023 2:49 pm
doomzie wrote: Tue Mar 14, 2023 1:02 pm 2. "Player bumps into the platform" (collides with the side of the platform)
BUMPSPECIAL should trigger that too.
Ok, thanks for confirming. I hadn't checked/noticed this yet.
User avatar
Fishytza
Posts: 783
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

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

Post by Fishytza »

New release is out: https://github.com/FishyClock/3Dplatfor ... s/tag/v2.0 - version 2.0
Spoiler: release message
Thank you very much for playtesting this thing for me, doomzie. :)
I really appreciate it.


EDIT: Just to point out a few things.
1) This is was tested and confirmed to run on GZDoom 4.10.0 (and will not run on earlier versions)
2) Regarding the generic platform class. Since I'm using user variables to set parameters for A_ChangeModel (check the "Custom" tab) it's not possible at the moment to use flag constants for the flags parameter. This is a UDB issue. Please use numeric values instead:
CMDL_WEAPONTOPLAYER = 1
CMDL_HIDEMODEL = 2
CMDL_USESURFACESKIN = 4

EDIT2:
3) Option flag 32768 is intended for very large, tightly packed platforms that have a lot of passengers.
Normally when a platform moves, all of its passengers will be moved at once without colliding with each other.
Flag 32768 changes this subtly by making sure all passengers from all platforms in the group won't collide with each other.
(This is not always desirable however. That's why it's optional.)

EDIT3: The "FCW_" prefix has been changed to just "Fishy"
doomzie
Posts: 94
Joined: Sat Apr 30, 2022 4:26 am

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

Post by doomzie »

Hey. I'm still way deep in it. Have managed to do some nice things. 3D Platform is awesome. I'll try to make a little demo recording one of these days. It's really bonkers what you can do when you put the effort into it to learn it.

Still trying to master the latest addition for IPs. Took me some time to get it. Making progress, but having some trouble with stopping a platform in a looped path and reversing it while it was already active basically. Getting close though to a full exploration of this library.

I don't fully understand flag 32768 though, the explanation looked scary, so I didn't want to mess with it until just recently, but I still don't get it .. lol. I've recently tried to learn something about it, due to some issue, but enabling or disabling the flag didn't solve it. I have some grouped platforms with crushing and as soon as they rotate (at a reasonable speed) the enemies seem to sort of bump/collide against the subplatforms or something and take up a lot of damage while they shouldn't. I thought 32768 might solve it, but it made it even worse =) Total slaughterfest.. =) I'll show it later in a recording.

Unfortunately Fishy, I do have discovered a real bug, unless you're going to tell me this was explained somewhere along the line or there's a disclaimer or something I don't know =)

Tiny bug demo map: https://www91.zippyshare.com/v/qT7qEJiL/file.html.

So it looks like certain slopes (probably with angle >= 45° ?) block enemies on platforms (sliding along or passing over it in air). At first I thought it was probably an EOA thing, but I made a crappy.. I mean legacy map and it happens there too. Platform moves (tries), but the enemies are seemingly/visually clearly blocked by something. The position aligns with the linedef of the slope. All enemies/items/... fall off the platform. Took me a long time to pinpoint the problem to a tiny 8 pixels high 45° sloped ledge .. I only realized it after seeing the same behaviour in another setup where there's a big slope > 45° .. the slope seems to become a blocking wall or something. It's all I can say.

Have a nice day sir.

Be back later.

Greetz!!
User avatar
Fishytza
Posts: 783
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

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

Post by Fishytza »

doomzie wrote: Tue Mar 28, 2023 6:42 pm but having some trouble with stopping a platform in a looped path and reversing it while it was already active basically. Getting close though to a full exploration of this library.
If you intend to fully control a platform via ACS thru _Interpolate(), _NextNode() and _PrevNode(), make sure it's not "active" because "active" means the platform is doing its own thinking and trying to follow its path.
_Interpolate() is useful if you want to do wacky shit like have the platform warp "forwards" or "backwards" and whatnot but again an "active" platform has a mind of its own :)
doomzie wrote: Tue Mar 28, 2023 6:42 pm I don't fully understand flag 32768 though
Its use case is really for a rather niche scenario. As for what it does you have to understand the logic behind how the platform moves its passengers.
So, under normal conditions each platform that tries to move will temporarily unlink all its passengers from the blockmap.
This is done so that each can be moved without colliding with each other while also still collide with anything that's not another passenger of the same platform. Meaning passengers from platform A will still collide with passengers from platform B, and it doesn't matter if platforms A and B are part of the same group or not.

Flag 32768 changes this so all passengers from all platforms of a single group are non-solid to each other during a move (while they will still collide with anything that's not a passenger of one of the group's platforms.)
The passengers will also not collide with any platform of that one group.
And the flag has to be set on the "main platform" to have that effect.

If you want an example, look at TEST01, play that map on Ultra-Violence and go to the southern area where there should be a tight group of zombiemen across several platforms along with some cyberdemons, archviles, and tiny pinky demons.
The flag is used for that one case there, if you uncheck it, that platform group will have trouble moving because one platform's passengers are getting in the way of the other platform's passengers and vice-versa.

The reason this isn't the default behavior is because it can ruin setups where you have mirroring behaviour.
In TEST01 again there is another example where there is "OLD" and "NEW" written on the ground. "OLD" doesn't use the flag and "NEW" does use it. Notice how with "NEW" the mirroring platforms' passengers won't collide with each other.
It's right next to where a single platform with 3 zombiemen is passing thru a set of line portals.

(I really hope I'm making sense here.)
doomzie wrote: Tue Mar 28, 2023 6:42 pm Unfortunately Fishy, I do have discovered a real bug, unless you're going to tell me this was explained somewhere along the line or there's a disclaimer or something I don't know =)
Yeah, the presence of the slopes is screwing up the internal logic somehow. After removing the sloped sector the archviles are detected and moved just fine, I'm gonna need to investigate some more later.
Thanks for bringing it up! :)
User avatar
Fishytza
Posts: 783
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

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

Post by Fishytza »

I managed to fix the slope bug
https://github.com/FishyClock/3Dplatfor ... 845360522b

Your test map now works as expected, doomzie.
Please tell me if this fixes things on your end?
doomzie
Posts: 94
Joined: Sat Apr 30, 2022 4:26 am

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

Post by doomzie »

Quick feedback. Yes indeed. Your latest commit resolves the slope bug! =)) Haven't tested extensively, but my two setups work perfect now. Thank you so much for your prompt action =))
User avatar
Fishytza
Posts: 783
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

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

Post by Fishytza »

doomzie wrote: Wed Mar 29, 2023 11:50 am Thank you so much for your prompt action =))
It was surprisingly easy to fix, heh
User avatar
Fishytza
Posts: 783
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

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

Post by Fishytza »

Don't hesitate if you have any more potential bugs to report. I might post a bugfix-release soon.
doomzie
Posts: 94
Joined: Sat Apr 30, 2022 4:26 am

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

Post by doomzie »

Some general feedback:

I think I have completed all possible FishyPlat combinations in terms of XYZ movement, relative, absolute, move to spot, spline path IP, linear path IP, with (counter)clockwise rotation AND all possible FishyPlat OPTFLAGS with and without groups. Test results are very good imho. No hard bugs were discovered other than the 3D floor collision and the slope bug in a year of testing.

The Interpolate() function is a little tricky, but I think I have it under control, with one minor issue left (it shifts one position instead of staying at its position). Gotta look into that, but been too lazy .. reversing forward/backward works though and is really cool.

I've even done extensive testing with super flag 32768 and I can't tell the difference, either it's worse or it's the same. The significance is not entirely clear, but other than that I think everything is clear. I'll likely get back to this point when I'm more knowledgeable.

I've done extensive stress testing with up to 150 platforms active at the same time, without any specific issues to report.
I've done tests with hundreds of IPs and everything works fine.


Remaining issues:

1. Well, I can't tell for sure, but there might still be cases where an enemy loses track of the platform and hangs in the air. I noticed you can easily trigger issues with spawning enemies on platforms, certain things cause the platform (group) to not move anymore. I'm avoiding it by careful custom calculated positioning to avoid enemy stacking (blocks the platform).

2. I've been having a lot of trouble with a specific setup. I've sent it to you previously. It just does not work. I've been trying to debug / make it work for many many months now. Not kidding. It concerns the two pillar setup (base & mirror pillar). Each consists of 10 stacked platforms (cubes). The purpose of this exercise/script is to understand/master/see the value of the MIRROR flag in context of grouping.
Spoiler:
What's the most advanced setup you've tested for grouped platforms that also have mirror platforms?

Have you run into any issues?

I've been hesitant to ask cause it might be entirely on my end, and previously I was more convinced it must be my spaghetti code, but I don't know anymore.

3. One grouped setup with crushing seems to kill enemies while it's rotating, .. I tried 32768 but results are worse. I don't know.

4. I'm unable to use custom parameters/variables for custom actors that are based on 3D Platform. I can add the custom actor based on FishyPlatform to a group and it works, but I can't affect in any way the parameters/settings of the custom actor. It falls back to its default setting or something. Even if set in UDMB and with ZScript defined user variables in the custom actor.. I don't know how to do it or there's something preventing this from working.

I can't tell from previous feedback if this is supposed to be working after all the necessary customization of the actor and using UDMB custom variables or if it will never work?

5. Unable to resolve my issue(s) with custom sounds for my new platforms. It simply does not work. Sound ok, definition ok as far as I can tell.


request/ideas notes:

setspecialholder dynamically <- i can spawn/build dynamically, but i can't do the last part

FishyPlat_IsActive(int array) <- to avoid huge while IsActive loops ???

setnextip dynamically (map interpolation point) <- i would instantly switch to map ip for dynamic creation -> lack of lines in map is no prob, it's all dynamic (currently prevents dynamic IP path creation)

how to possibly differentiate between BUMPING and LANDING/STEPPING ON platform .. maybe .. or alternatively upgraded FishyPlat actor class that allows more refined interaction with the platform .. it's just a note Fishy =) will probably never happen, but I'm writing it down anyways..

video gfx note:

switched to VULKAN for testing, works again now on 4.8.10 and performance is noticably better (again) versus OGL
standing on the platforms doesn't generate the visual jittery i always have with opengl (standing on the moving platforms), very happy to see this, but I have more minor screen tears with VULKAN.. just fyi


I had more to say, but I forgot .. lol

edit:

oh right, going to upload some recordings to YT in the coming days/week.

still need to play with a platform that has a USESPECIAL =) (note to myself)

also, I might be hooked on 3DP, this ZScript library has been a wonderful sidetrack from purely architectural mapping for about a year now I think.. <3 <3 <3

I was expecting some experts to jump on this thread and show the noobs how you can heavily PIMP your "platform". I'd love to see some stuff other people come up with, especially cause you can heavily customize your platforms with DECORATE/ZScript code which I don't know at all, .. like you did for me with the Turret. That worked out amazing!



greetz
doomzie
User avatar
Fishytza
Posts: 783
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

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

Post by Fishytza »

doomzie wrote: Sat Apr 08, 2023 2:40 pm I've even done extensive testing with super flag 32768 and I can't tell the difference, either it's worse or it's the same. The significance is not entirely clear, but other than that I think everything is clear. I'll likely get back to this point when I'm more knowledgeable.
Like I said, that flag changes the internal behaviour so that during a move all passengers from all platforms in a single group won't collide with each other or with the other platforms in that group. In about 98% of cases you really, really, really don't need to use it. And in the case of mirroring behaviour, it will cause problems.
If it's causing you problems then don't use it.
doomzie wrote: Sat Apr 08, 2023 2:40 pm 1. Well, I can't tell for sure, but there might still be cases where an enemy loses track of the platform and hangs in the air. I noticed you can easily trigger issues with spawning enemies on platforms, certain things cause the platform (group) to not move anymore. I'm avoiding it by careful custom calculated positioning to avoid enemy stacking (blocks the platform).
That, I think, has more to due with engine quirks. You can get the same effect by using the fly cheat to hang in midair then open the console and summon, like, 5 pinky demons (enter "summon demon"). You'll notice the pinkies being stuck there in midair, not moving anywhere despite running their chase animation.

As for losing passengers, well, the platform intentionally loses track of any passenger it fails to move - that serves to possibly block other passengers - because hey, this one bumped into a wall, now this other one bumps into the first one who got blocked into the wall etc etc. (They get reacquired in the next blockmap search).
doomzie wrote: Sat Apr 08, 2023 2:40 pm 2. I've been having a lot of trouble with a specific setup. I've sent it to you previously. It just does not work. I've been trying to debug / make it work for many many months now. Not kidding. It concerns the two pillar setup (base & mirror pillar). Each consists of 10 stacked platforms (cubes). The purpose of this exercise/script is to understand/master/see the value of the MIRROR flag in context of grouping.
I'm sorry but I don't have that test map anymore and I've deleted the PM you sent.
I didn't think I'd needed it anymore after the problem that came with it was fixed.

But it sounds to me you have really complex setup.
doomzie wrote: Sat Apr 08, 2023 2:40 pm One pillar is the master and the other pillar is the mirror, whether grouped or not grouped, all the mirror pillar cubes need to mirror the movement of the base pillar cubes.
Ok, logically if it's not grouped that no one can mirror anything. For everything that needs to mirror something, give it the mirror flag.
doomzie wrote: Sat Apr 08, 2023 2:40 pm The trick is that it does two different groupings. One basic grouping on one origin (bottom cube of the base pillar) and then afterwards it also uses a cross grouping of each individual cube of the base with its counterpart of the mirror pillar. Seperately it works just great, but when I start making a sequence of different groupings, well..
I'll say again, trying to group one platform from group X with another platform from group Y will merge those two groups together - so they're all in one group.
To prevent that you'd probably want to clear all groups before regrouping everything - I can't remember how you did it in the test map (that I no longer have).
doomzie wrote: Sat Apr 08, 2023 2:40 pm What's the most advanced setup you've tested for grouped platforms that also have mirror platforms?

Have you run into any issues?
Probably TEST03 - there's a set of blue platforms to the south. Trying to see how it behaves when toggling the mirror flag. It's not crystal perfect but good enough.
I feel like I need to point out this sort of thing needs careful setup because it's not exactly 100% flexible.

And I'm sorry, because as much as I'd like to keep it flexible, I don't have the enthusiasm anymore to code in more checks for the odd edge case bug here and there.
Because first I'd not only have to debug at what point a problem pops up but then how best to approach it code-wise. And it has gotten to the point where you can't change one thing and hope it doesn't break the rest of the system.

Plus it has become hard to figure out if something is just a GZDoom engine quirk that can't be easily worked around.
doomzie wrote: Sat Apr 08, 2023 2:40 pm 3. One grouped setup with crushing seems to kill enemies while it's rotating, .. I tried 32768 but results are worse. I don't know.
Ok,
1) Flag 32768 shouldn't be used there, probably.
And
2) I am sorry but I cannot get anything useful from that - if you can construct a test sample then that'll be great. If not then consider changing your setup.
doomzie wrote: Sat Apr 08, 2023 2:40 pm I'm unable to use custom parameters/variables for custom actors that are based on 3D Platform. I can add the custom actor based on FishyPlatform to a group and it works, but I can't affect in any way the parameters/settings of the custom actor. It falls back to its default setting or something. Even if set in UDMB and with ZScript defined user variables in the custom actor.. I don't know how to do it or there's something preventing this from working.

I can't tell from previous feedback if this is supposed to be working after all the necessary customization of the actor and using UDMB custom variables or if it will never work?
I can't tell what you're trying to do. I also can't tell if you're trying to use the generic platform class or something else.

This page here is a bit old but should give a general idea what user variables are: https://zdoom.org/wiki/User_variable
In the context of ZScript user vars can be set directly via UDB in the Thing's "Custom" tab.
How those variables work is up to you to code.
doomzie wrote: Sat Apr 08, 2023 2:40 pm 5. Unable to resolve my issue(s) with custom sounds for my new platforms. It simply does not work. Sound ok, definition ok as far as I can tell.
How about you try https://zdoom.org/wiki/A_StartSound? You don't need anything SNDSEQ defined for that one.
But otherwise? I can't tell what you're doing that makes it simply not work.
doomzie wrote: Sat Apr 08, 2023 2:40 pm request/ideas notes:
I'll say again, I am not accepting feature requests at this time and in the forseeable future.
doomzie wrote: Sat Apr 08, 2023 2:40 pm setspecialholder dynamically <- i can spawn/build dynamically, but i can't do the last part
Try https://zdoom.org/wiki/SetThingSpecial. Wait about 1 tick after the platform has spawned then use that on the platform directly to set whatever special+arguments you want.
doomzie
Posts: 94
Joined: Sat Apr 30, 2022 4:26 am

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

Post by doomzie »

FishyClockwork wrote: Sun Apr 09, 2023 5:00 am
doomzie wrote: Sat Apr 08, 2023 2:40 pm 1. Well, I can't tell for sure, but there might still be cases where an enemy loses track of the platform and hangs in the air. I noticed you can easily trigger issues with spawning enemies on platforms, certain things cause the platform (group) to not move anymore. I'm avoiding it by careful custom calculated positioning to avoid enemy stacking (blocks the platform).
That, I think, has more to due with engine quirks. You can get the same effect by using the fly cheat to hang in midair then open the console and summon, like, 5 pinky demons (enter "summon demon"). You'll notice the pinkies being stuck there in midair, not moving anywhere despite running their chase animation.

As for losing passengers, well, the platform intentionally loses track of any passenger it fails to move - that serves to possibly block other passengers - because hey, this one bumped into a wall, now this other one bumps into the first one who got blocked into the wall etc etc. (They get reacquired in the next blockmap search).
Even with careful spawning I noticed that the platforms don't move anymore IF the enemies have not seen the player yet.
For a 200px cube it happens after 5 enemies are spawned.. one centered, 4 on the corners, without them colliding. Clean positioning.
As soon as I enter the arena, the enemies see me and the platform moverotates again.
I'll look deeper into this with some (very) large platform testing and higher quantity spawning.
I haven't really tested it enough.
Yes, this might very well be gzdoom engine related as you say, I'm just reporting it as I'm testing..
FishyClockwork wrote: Sun Apr 09, 2023 5:00 am
doomzie wrote: Sat Apr 08, 2023 2:40 pm 2. I've been having a lot of trouble with a specific setup. ...
I'm sorry but I don't have that test map anymore and I've deleted the PM you sent.
I didn't think I'd needed it anymore after the problem that came with it was fixed.

But it sounds to me you have really complex setup.
Ok, logically if it's not grouped that no one can mirror anything. For everything that needs to mirror something, give it the mirror flag.
I'll say again, trying to group one platform from group X with another platform from group Y will merge those two groups together - so they're all in one group.
To prevent that you'd probably want to clear all groups before regrouping everything - I can't remember how you did it in the test map (that I no longer have).
I'll send you something later. I'm trying to clean up as many issues as possible before recording and the remaining odd issue or two, I'll send you something concrete via PM. I would just like to have a confirmation that it's not possible for some reason or other.
FishyClockwork wrote: Sun Apr 09, 2023 5:00 am
doomzie wrote: Sat Apr 08, 2023 2:40 pm What's the most advanced setup you've tested for grouped platforms that also have mirror platforms?
And I'm sorry, because as much as I'd like to keep it flexible, I don't have the enthusiasm anymore to code in more checks for the odd edge case bug here and there. Because first I'd not only have to debug at what point a problem pops up but then how best to approach it code-wise. And it has gotten to the point where you can't change one thing and hope it doesn't break the rest of the system. Plus it has become hard to figure out if something is just a GZDoom engine quirk that can't be easily worked around.
No problem Fishy, I'm just noting it here. You have done an incredible job. I've looked again all weekend long at your ZScript mastery and I'm in awe. Seriously.
FishyClockwork wrote: Sun Apr 09, 2023 5:00 am
doomzie wrote: Sat Apr 08, 2023 2:40 pm 3. One grouped setup with crushing seems to kill enemies while it's rotating, .. I tried 32768 but results are worse. I don't know.
I am sorry but I cannot get anything useful from that - if you can construct a test sample then that'll be great. If not then consider changing your setup.
Just a heads up on one of the issues I will show via recording.
FishyClockwork wrote: Sun Apr 09, 2023 5:00 am
doomzie wrote: Sat Apr 08, 2023 2:40 pm I can't tell from previous feedback if this is supposed to be working after all the necessary customization of the actor and using UDMB custom variables or if it will never work?
I can't tell what you're trying to do. I also can't tell if you're trying to use the generic platform class or something else.
This page here is a bit old but should give a general idea what user variables are: https://zdoom.org/wiki/User_variable
In the context of ZScript user vars can be set directly via UDB in the Thing's "Custom" tab.
How those variables work is up to you to code.
I've reworked the ZScript class, but I have a noob issue I can't figure out:
I posted it here: viewtopic.php?p=1239099#p1239099, since it's beyond the scope of 3DP.
Afterwards I'll try again to inherit from FishyPlatform and try to merge it in a group, and see if the user variables actually work!
FishyClockwork wrote: Sun Apr 09, 2023 5:00 am
doomzie wrote: Sat Apr 08, 2023 2:40 pm 5. Unable to resolve my issue(s) with custom sounds for my new platforms. It simply does not work. Sound ok, definition ok as far as I can tell.
How about you try https://zdoom.org/wiki/A_StartSound? You don't need anything SNDSEQ defined for that one.
But otherwise? I can't tell what you're doing that makes it simply not work.
Yeah sound plays in SLADE and in the map as well via ACS.
It's definitely something I don't get, but I don't know.
Class is based on your FishyDemoPlatWithSound (or whatever it's called).. SndSeq property defined.
I'll post/send something later.

edit: ok A_PlaySound .. I'll see if it works that way. I haven't tried that.
FishyClockwork wrote: Sun Apr 09, 2023 5:00 am
doomzie wrote: Sat Apr 08, 2023 2:40 pm setspecialholder dynamically <- i can spawn/build dynamically, but i can't do the last part
Try https://zdoom.org/wiki/SetThingSpecial. Wait about 1 tick after the platform has spawned then use that on the platform directly to set whatever special+arguments you want.
But that's to set a Thing Special? I'm using it, but I was refering to having a way to link the platform to its "specialholder" tag id, so the script attached to the special holder action is executed. Am I missing something? The platforms are being spawned, moved into place, but I can't update the "specialholder" field of FishyPlatform I think?
User avatar
Fishytza
Posts: 783
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference

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

Post by Fishytza »

doomzie wrote: Mon Apr 10, 2023 4:28 am But that's to set a Thing Special? I'm using it, but I was refering to having a way to link the platform to its "specialholder" tag id, so the script attached to the special holder action is executed. Am I missing something? The platforms are being spawned, moved into place, but I can't update the "specialholder" field of FishyPlatform I think?
What are you trying to do exactly?
If you're trying to change a platform's special+args after it's already on the way, SetThingSpecial is the way to do it.
If you want to set the special on startup, wait 1 tick in your ACS script then call SetThingSpecial on the platform.

The whole point behind the "special holder" is to hold the actual special+args the platform will copy for itself after initial setup. After that moment what's the point of another special holder? (Again, I don't know what you're trying to do.)

The process in the platform's PostBeginPlay function is basically:
First, setup behaviour based on its own arguments (intepolation point, options, someone to group with, crush damage and finally special holder)
And then it will look for any actor whose TID matches "special holder" - the first actor it finds it will copy that actor's special+arguments for itself.

After this point
If you want to change the platform's special+args, use SetThingSpecial.


doomzie wrote: Mon Apr 10, 2023 4:28 am Yeah sound plays in SLADE and in the map as well via ACS.
It's definitely something I don't get, but I don't know.
Class is based on your FishyDemoPlatWithSound (or whatever it's called).. SndSeq property defined.
I'll post/send something later.
Have you tried making sure your SNDSEQ entry works? Like setting it as a sequence for a door or something?
https://zdoom.org/wiki/Sound_sequence

---------

As for the other issues you mentioned, either a recording/youtube video would be nice
or better yet
a test map.

Another thing. I feel like this thread is not the place to talk about things and issues that are unrelated to the platform library. (Like the sound issue) I understand looking through the zdoom wiki doesn't give you all the answers so if you need folks to help you learn or fix something, zdoom has a discord server: viewtopic.php?t=54921
In that server there are a few channels dedicated to zscript and mapping questions.

Or of course you can keep using the Scripting sub-forum, but discord might be faster
doomzie
Posts: 94
Joined: Sat Apr 30, 2022 4:26 am

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

Post by doomzie »

PM sent with two maps already.

I think my base & mirror pillar setup (GROUP + MIRROR + Z movement) has possibly revealed #3. I think. Up to you to investigate.

I added my 3DP train gimmick as well (which has the "sound issue").

greetz

edit: yeah I recently found the (G)Zdoom Discord server... I'm on the UDMB discord too and several others..


SetSpecialThing:

OK. I think I got where I got confused =) lol, trying now, get back to you.

So tried again, but it seemingly has no effect:
SetThingSpecial(intExitFloorCubeTID,"MagicCubeExitFloor",0,0,0,0,intExitFloorSpecialHolder);

Return to “Script Library”