"How do I ZScript?"
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!)
Re: ZScript-only "How do I..." thread
SF_IGNOREVISIBILITY.
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: ZScript-only "How do I..." thread
He was asking what that was, ZZYZX.
@ibm it's a flag.
@Graf, so if we were to create a GL light via zscript, would that be something we can then immediately spawn, or would that be something we must apply via GLdefs to ensure proper attachment?
@ibm it's a flag.
@Graf, so if we were to create a GL light via zscript, would that be something we can then immediately spawn, or would that be something we must apply via GLdefs to ensure proper attachment?
Re: ZScript-only "How do I..." thread
No, he was trying SF_IGNOREINVISIBILITY which doesn't even exist. I corrected it.
Re: ZScript-only "How do I..." thread
Very simple ZScript question:
Are there any virtual functions for when the player presses +USE on the thing?
Are there any virtual functions for when the player presses +USE on the thing?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZScript-only "How do I..." thread
No. All you have right now is +USESPECIAL.
Re: ZScript-only "How do I..." thread
[Oops, wrong thread!]
Last edited by DavidN on Sat Feb 04, 2017 2:37 pm, edited 1 time in total.
- Ed the Bat
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
- Contact:
Re: ZScript-only "How do I..." thread
I'm not sure I see how that's at all relevant to ZScript
Re: ZScript-only "How do I..." thread
I think the confusion comes from the thread title; both have "How do I..." on them... ?
Re: ZScript-only "How do I..." thread
So I want to get whether the player is currently firing without doing an input check (since this will allow the player to quickly press the fire button and count as "firing" for less time than they should), and I was wondering how I would do this. I was looking at CurState, using ResolveState() to generate a state based on a string, but it wasn't working - could someone point me in the right direction on this? Specifically this is on an enemy, so being able to do it with the target pointer would be nice.
Re: ZScript-only "How do I..." thread
You probably can check if player's sprite is "Missile" using target.InStateSequence(target.CurState, target.ResolveState('Missile')), but I'd wait for someone to suggest a way to do this on the actual player's weapon to check if it's in Fire sequence.
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: The thread for "How do I ZScript?"
Changed the title of this thread in hopes of making it more visually distinct from the other one.
How do you get a thing to move along with a moving platform (say the lift on Map15) without using Actor.Tick()?
(I'm trying to set up an actor that, once it's come to a rest, simply stays on the floor and does nothing else - if this is not worth doing instead of just going with Actor.Tick() please let me know)
EDIT: Can someone tell me just where in the source code it shows what happens during a Tick() call? There are like a whole assload of thing I don't even know I don't know.
How do you get a thing to move along with a moving platform (say the lift on Map15) without using Actor.Tick()?
(I'm trying to set up an actor that, once it's come to a rest, simply stays on the floor and does nothing else - if this is not worth doing instead of just going with Actor.Tick() please let me know)
EDIT: Can someone tell me just where in the source code it shows what happens during a Tick() call? There are like a whole assload of thing I don't even know I don't know.
Re: The thread for "How do I ZScript?"
Gonna have to requote myself from another thread, for truth:
May be worth sharing a few more details about what you're trying to achieve so that it can be approached in a different direction. The description given is a bit vague.Xaser wrote:We all know the phrase "reinventing the wheel." Reimplementing Actor.Tick is a bit more like "reinventing the combustion engine."
Re: The thread for "How do I ZScript?"
Not reimplementing Actor.Tick(), but adding some per-tick processing there. Please stop telling people to not use features because it's ideologically incorrect, or at least get the context first.
Also yes, I'd use Actor.Tick().
Also yes, I'd use Actor.Tick().
Re: The thread for "How do I ZScript?"
The edit suggests he's indeed wishing to reimplement Actor.Tick(). The intent is still a bit unclear, hence my ask for clarification.ZZYZX wrote:Not reimplementing Actor.Tick(), but adding some per-tick processing there.
I am discouraging a particular action because it is difficult and error-prone, and this is a "How do I...?" thread geared toward helping out relative newcomers to the language. Please understand the context of this thread first.Please stop telling people to not use features because it's ideologically incorrect, or at least get the context first.
- Ed the Bat
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
- Contact:
Re: The thread for "How do I ZScript?"
Correct me if I'm wrong, but as far as I understand (and have been doing so far), calling Super.Tick() or Actor.Tick() within an overridden Tick function ensures nothing is lost or overwritten from the original Tick. Adding more things on top of that shouldn't hurt that.