ZScript Discussion

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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!)
Locked
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript Discussion

Post by Graf Zahl »

Sure. I'm busy with other stuff so if you want to help out I'd very much appreciate it.
User avatar
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

Post by Major Cooke »

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...
User avatar
ZZYZX
 
 
Posts: 1384
Joined: Sun Oct 14, 2012 1:43 am
Location: Ukraine
Contact:

Re: ZScript Discussion

Post by ZZYZX »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript Discussion

Post by Graf Zahl »

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.
User avatar
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

Post by Major Cooke »

Seriously? Holy shit.

What's next, mapping with ZScript and generating sectors procedurally? :P
User avatar
ZZYZX
 
 
Posts: 1384
Joined: Sun Oct 14, 2012 1:43 am
Location: Ukraine
Contact:

Re: ZScript Discussion

Post by ZZYZX »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript Discussion

Post by Graf Zahl »

ZZYZX wrote: or at least a quasi thinker in the form of an actor that you place in a sector and give it parameters.
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.

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.
User avatar
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

Post by Major Cooke »

Can't wait to see it happen. That's just exciting!

Now... About this new custom property definition implementation...

Code: Select all

property LowMessage: LowHealth, LowHealthMessage;
Does this translate to:

Code: Select all

LowMessage.LowHealth 50;
LowMessage.LowHealthMessage "Medkit found. Bleeding staunched."
Or is it:

Code: Select all

Default
{
	LowMessage
	{
		LowHealth 50;
		LowMessage "Medkit found. Bleeding staunched.";
	}
}
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript Discussion

Post by Graf Zahl »

Check out the Medikit.
User avatar
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

Post by Major Cooke »

Would this by any chance support arrays? I'm thinking it would because of args[].
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript Discussion

Post by Graf Zahl »

Not yet.
User avatar
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

Post by Major Cooke »

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?

Code: Select all

Super.Super.DoEffect()
User avatar
ZZYZX
 
 
Posts: 1384
Joined: Sun Oct 14, 2012 1:43 am
Location: Ukraine
Contact:

Re: ZScript Discussion

Post by ZZYZX »

There should be qualified superclass call, but it is not yet implemented.
i.e. something like Actor.Tick().
User avatar
ZZYZX
 
 
Posts: 1384
Joined: Sun Oct 14, 2012 1:43 am
Location: Ukraine
Contact:

Re: ZScript Discussion

Post by ZZYZX »

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?
User avatar
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

Post by Major Cooke »

ZScript (and I think DECORATE) were changed so actor loading is postponed until all the base ones are built up first, I think.
Locked

Return to “Scripting”