Give ZScript access to isFast() and isSlow()

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Give ZScript access to isFast() and isSlow()

Re: Give ZScript access to isFast() and isSlow()

by Major Cooke » Sun Jul 01, 2018 5:49 pm

Ah, you mean to also include the skill config then. I see.

Re: Give ZScript access to isFast() and isSlow()

by Arctangent » Sun Jul 01, 2018 1:18 pm

That checks the Fast / Slow state flag, not whether or not the actor itself is fast or slow.

Re: Give ZScript access to isFast() and isSlow()

by Major Cooke » Sun Jul 01, 2018 6:59 am

You can already access the state directly to retrieve the booleans.

(Note, I haven't tested this code.)

Code: Select all

let s = CurState;
if (s && s.bSlow)
// ...
Likewise, bFast is the boolean for fast.

Give ZScript access to isFast() and isSlow()

by Arctangent » Sat Jun 30, 2018 10:56 pm

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.

Top