ZScript Discussion
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!)
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: ZScript Discussion
I tossed up D4D's key picker upper on the ThinkerIterator page.
Also, Graf, I'm looking forward to the merge.
Also, Graf, I'm looking forward to the merge.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZScript Discussion
Actually, that particular use case is better suited for a BlockThingsIterator because it needs to look at far less actors...
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: ZScript Discussion
True, but at the time it was made, BlockThingsIterator didn't exist. It was made at least like... a fw weeks to a month before it came into existence.
But I need more information on how BlockThingsIterator works first before I can use it. What I cannot tell is, is there an internal range or do we need to perform the range ourselves?
But I need more information on how BlockThingsIterator works first before I can use it. What I cannot tell is, is there an internal range or do we need to perform the range ourselves?
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: ZScript Discussion
Another quick question, is it possible to compare colors?
If not, could there be a function which allows comparing?
Code: Select all
if (bloodcolor == "Red")
If not, could there be a function which allows comparing?
Code: Select all
if (CompareColor(bloodcolor,"Red"))
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZScript Discussion
Major Cooke wrote:True, but at the time it was made, BlockThingsIterator didn't exist. It was made at least like... a fw weeks to a month before it came into existence.
But I need more information on how BlockThingsIterator works first before I can use it. What I cannot tell is, is there an internal range or do we need to perform the range ourselves?
Right now it does not do an internal range check, but that should be added for performance reason because every return that can be discarded on the native side is a win.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZScript Discussion
Careful. Bloodcolor has a palette index mixed in, it's not directly comparable, you'd have to do 'if(bloodcolor & 0xffffff) == color("Red")) to mask that out.Major Cooke wrote:Another quick question, is it possible to compare colors?Code: Select all
if (bloodcolor == "Red")
If not, could there be a function which allows comparing?Code: Select all
if (CompareColor(bloodcolor,"Red"))
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: ZScript Discussion
Hmm, perhaps a dedicated function inside Actor.txt might be best so people can actually do that.Graf Zahl wrote:Careful. Bloodcolor has a palette index mixed in, it's not directly comparable, you'd have to do 'if(bloodcolor & 0xffffff) == color("Red")) to mask that out.
All of them could use this.Graf Zahl wrote:Right now it does not do an internal range check, but that should be added for performance reason because every return that can be discarded on the native side is a win.
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: ZScript Discussion
I'm curious, how does 'frame' work? Seems like it's performing character to int conversions internally.
Last edited by Major Cooke on Tue Dec 06, 2016 10:08 am, edited 1 time in total.
Re: ZScript Discussion
Fortunately, it's pretty simple: Frame 0 is 'A', 1 is 'B', 2 is 'C', and so on.
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: ZScript Discussion
That's actually perfect for my needs. Thanks!
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: ZScript Discussion
It won't be the last. This is merely the first part of ZScript to come. Graf's going to continue developing ZScript on the separated branch, from the looks of it.Eruanna wrote:I've gone ahead and started the build for what might be the last GZZScript build then.
Re: ZScript Discussion
Please NO.Graf Zahl wrote:I also think we can now declare most of what is there final with no more need to change. This also means, once a decision is made, nothing in there can be changed anymore.
I think MANY things about the language should be seriously discussed before making the mistake of "having it final" again and make the whole thing turn into DECORATE 2.0.
I recall countless times where you said "zscript is still in the works so let's not discuss this now" which in the end only allowed you to avoid important matters that need discussion.
Ironically the urge to make sure everything is right here is only caused by this "let's make everything final" mentality which I never understood.
Re: ZScript Discussion
Like what?Leonard2 wrote:I think MANY things about the language should be seriously discussed
[Note: I'm asking earnestly. I'm curious to know what discussion points are still on the table, if any.]
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: ZScript Discussion
Leonard, he means for phase 1. And he's probably just talking about the Actor part.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZScript Discussion
@Leonard:
If you have issues, please name them. I can only go by the feedback I get from users and so far nobody has told me that stuff needs to be reviewed.
If you have issues, please name them. I can only go by the feedback I get from users and so far nobody has told me that stuff needs to be reviewed.