'meta'?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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!)
User avatar
Major Cooke
Posts: 8200
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

'meta'?

Post by Major Cooke »

So I've seen this crop up from time to time and I still have no idea what it does...

Anyone have any ideas on what 'meta' variables do in ZScript?
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

Re: 'meta'?

Post by The Zombie Killer »

As I understand it, they're basically readonly static variables. The source describes them as "static class data (by necessity read only.)"
User avatar
Major Cooke
Posts: 8200
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: 'meta'?

Post by Major Cooke »

Turns out they're actually more like 'constant properties', and not actually static. Because regular constants cannot be changed in inheriting children:

Code: Select all

const SomeDouble = 2.5; // <-- This cannot be modified in a child, since any attempt it disregarded.
Whereas meta can be changed via properties, but not by anything else.

Return to “Scripting”