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?
'meta'?
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!)
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!)
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: 'meta'?
As I understand it, they're basically readonly static variables. The source describes them as "static class data (by necessity read only.)"
-
- Posts: 8200
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: 'meta'?
Turns out they're actually more like 'constant properties', and not actually static. Because regular constants cannot be changed in inheriting children:
Whereas meta can be changed via properties, but not by anything else.
Code: Select all
const SomeDouble = 2.5; // <-- This cannot be modified in a child, since any attempt it disregarded.