GetStatSize() (ZScript)

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: Developers

GetStatSize() (ZScript)

Postby Major Cooke » Sat Jun 02, 2018 2:52 pm

Simple. A static function that returns the size of a specified stat. If left empty or is some invalid number, defaults to maximum stat + 1 which means it gets the size combined of all stats.
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: GetStatSize() (ZScript)

Postby Marisa Kirisame » Sat Jun 02, 2018 5:37 pm

What do you mean by "size of a stat"?
User avatar
Marisa Kirisame
ZScript Magician
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa

Re: GetStatSize() (ZScript)

Postby Major Cooke » Sat Jun 02, 2018 11:35 pm

How many active thinkers are in a particular stat.

Right now you can only do a while loop until it's all the way over which strikes me as inefficient when just trying to establish how many thinkers are in there -- especially if it's on ZScript's side. Probably much better to have it done on the source if anything, especially if this is done often.
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: GetStatSize() (ZScript)

Postby ZippeyKeys12 » Fri Sep 14, 2018 4:57 pm

https://github.com/coelckers/gzdoom/pull/574
Let's see if I fucked anything up, or if Graf doesn't want it in. (Or both)
ZippeyKeys12
 
Joined: 15 Jun 2016


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests