Give ZScript access to isFast() and isSlow()
Moderator: GZDoom Developers
- Arctangent
- Posts: 1235
- Joined: Thu Nov 06, 2014 1:53 pm
- Contact:
Give ZScript access to isFast() and isSlow()
I feel like this is a bit self-explanatory, and I feel like the fact that ZScript doesn't already have access to these functions is just an oversight given how much ZDoom already allows in terms of extending the fast and slow monsters settings. Granted, isSlow() might be a little niche compared to isFast(), but that goes for the slow monsters setting in general and this'd be nice for the handful of mods that'll end up using it.
- Major Cooke
- Posts: 8214
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Give ZScript access to isFast() and isSlow()
You can already access the state directly to retrieve the booleans.
(Note, I haven't tested this code.)
Likewise, bFast is the boolean for fast.
(Note, I haven't tested this code.)
Code: Select all
let s = CurState;
if (s && s.bSlow)
// ...
- Arctangent
- Posts: 1235
- Joined: Thu Nov 06, 2014 1:53 pm
- Contact:
Re: Give ZScript access to isFast() and isSlow()
That checks the Fast / Slow state flag, not whether or not the actor itself is fast or slow.
- Major Cooke
- Posts: 8214
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Give ZScript access to isFast() and isSlow()
Ah, you mean to also include the skill config then. I see.