"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!)
-
-
- Posts: 1379
- Joined: Sun Oct 14, 2012 1:43 am
- Discord: ZZYZX#1394
- Github ID: jewalky
- Location: Ukraine
Re: ZScript-only "How do I..." thread
SF_IGNOREVISIBILITY.
-
- Posts: 8055
- Joined: Sun Jan 28, 2007 3:55 pm
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?
-
-
- Posts: 1379
- Joined: Sun Oct 14, 2012 1:43 am
- Discord: ZZYZX#1394
- Github ID: jewalky
- Location: Ukraine
Re: ZScript-only "How do I..." thread
No, he was trying SF_IGNOREINVISIBILITY which doesn't even exist. I corrected it.
-
-
- Posts: 17281
- Joined: Mon Oct 27, 2003 12:07 am
- Twitch ID: nashmuhandes
- Github ID: nashmuhandes
- Location: Kuala Lumpur, Malaysia
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?
-
- Lead GZDoom+Raze Developer
- Posts: 47962
- 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.
-
-
- Posts: 264
- Joined: Mon Dec 28, 2015 6:22 pm
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.
-
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- OS Test Version: No (Using Stable Public Version)
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
Re: ZScript-only "How do I..." thread
I'm not sure I see how that's at all relevant to ZScript
-
-
- Posts: 17281
- Joined: Mon Oct 27, 2003 12:07 am
- Twitch ID: nashmuhandes
- Github ID: nashmuhandes
- Location: Kuala Lumpur, Malaysia
Re: ZScript-only "How do I..." thread
I think the confusion comes from the thread title; both have "How do I..." on them... ?
-
- User Accounts Assistant
- Posts: 460
- Joined: Sat Apr 16, 2016 6:01 am
- Discord: Gutawer#3431
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.
-
-
- Posts: 1379
- Joined: Sun Oct 14, 2012 1:43 am
- Discord: ZZYZX#1394
- Github ID: jewalky
- Location: Ukraine
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.
-
- Posts: 9663
- Joined: Sun Jan 04, 2004 5:37 pm
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
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.
-
-
- Posts: 10771
- Joined: Sun Jul 20, 2003 12:15 pm
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."
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.
-
-
- Posts: 1379
- Joined: Sun Oct 14, 2012 1:43 am
- Discord: ZZYZX#1394
- Github ID: jewalky
- Location: Ukraine
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().
-
-
- Posts: 10771
- Joined: Sun Jul 20, 2003 12:15 pm
Re: The thread for "How do I ZScript?"
ZZYZX wrote:Not reimplementing Actor.Tick(), but adding some per-tick processing there.
The edit suggests he's indeed wishing to reimplement Actor.Tick(). The intent is still a bit unclear, hence my ask for clarification.
Please stop telling people to not use features because it's ideologically incorrect, or at least get the context first.
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.
-
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- OS Test Version: No (Using Stable Public Version)
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
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.