ZScript Discussion
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.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
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.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZScript Discussion
Sure. I'm busy with other stuff so if you want to help out I'd very much appreciate it.
- Major Cooke
- Posts: 8221
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: ZScript Discussion
Only curious, but will ZScript allow for potential dynamic slopes by chance? I ask because... well, it seemed like randi originally was going to implement them when he brought the build engine over...
Particularly, adjusting vertices...
Particularly, adjusting vertices...
Re: ZScript Discussion
Pretty sure SecPlane struct allows setting the slope. This way it should be possible to calculate new slope based on height at specific vertices and just set that. Correct me if I'm wrong here, haven't tried yet.
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZScript Discussion
The main thing with dynamic slopes is writing a working thinker to perform the movement, the rest is not relevant. Should be even possible to do this yourself once the functionality has been exported.
- Major Cooke
- Posts: 8221
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: ZScript Discussion
Seriously? Holy shit.
What's next, mapping with ZScript and generating sectors procedurally?
What's next, mapping with ZScript and generating sectors procedurally?
Re: ZScript Discussion
The current problem is that ChangeHeight or normal changes don't update the OpenGL structures.
Otherwise slope changing works just fine already, in software that is.
So once that's fixed, anyone could write a thinker for dynamic slopes, or at least a quasi thinker in the form of an actor that you place in a sector and give it parameters.
Otherwise slope changing works just fine already, in software that is.
So once that's fixed, anyone could write a thinker for dynamic slopes, or at least a quasi thinker in the form of an actor that you place in a sector and give it parameters.
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZScript Discussion
That part won't work that well, you still have to call P_ChangeSector to handle actor placement in the sector. That and the flagging of the sector for updating the GL structures are really everything that's missing right now.ZZYZX wrote: or at least a quasi thinker in the form of an actor that you place in a sector and give it parameters.
I'd still implement a ChangePlane function that takes care of the necessary bookkeeping than doing it all script side. If then something needs adjustment it can be done in a function that's on the safe side.
- Major Cooke
- Posts: 8221
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: ZScript Discussion
Can't wait to see it happen. That's just exciting!
Now... About this new custom property definition implementation...
Does this translate to:
Or is it:
Now... About this new custom property definition implementation...
Code: Select all
property LowMessage: LowHealth, LowHealthMessage;Code: Select all
LowMessage.LowHealth 50;
LowMessage.LowHealthMessage "Medkit found. Bleeding staunched."Code: Select all
Default
{
LowMessage
{
LowHealth 50;
LowMessage "Medkit found. Bleeding staunched.";
}
}- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZScript Discussion
Check out the Medikit.
- Major Cooke
- Posts: 8221
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: ZScript Discussion
Would this by any chance support arrays? I'm thinking it would because of args[].
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZScript Discussion
Not yet.
- Major Cooke
- Posts: 8221
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: ZScript Discussion
Is it possible to 'skip' one super call? I.e. I want to remove the time freeze flickering effect as the powerup starts to wear off and make it last the entire time.
Is this feasible?
Is this feasible?
Code: Select all
Super.Super.DoEffect()Re: ZScript Discussion
There should be qualified superclass call, but it is not yet implemented.
i.e. something like Actor.Tick().
i.e. something like Actor.Tick().
Re: ZScript Discussion
I'm trying to implement a third party ZScript parser here, and found a weird thing.
How come Shotgun class is defined before the class that it inherits from (DoomWeapon)? Is this normal? How does it work at all?
How come Shotgun class is defined before the class that it inherits from (DoomWeapon)? Is this normal? How does it work at all?
- Major Cooke
- Posts: 8221
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: ZScript Discussion
ZScript (and I think DECORATE) were changed so actor loading is postponed until all the base ones are built up first, I think.