GetSky for ACS

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

Moderator: GZDoom Developers

User avatar
SPZ1
Posts: 371
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois

GetSky for ACS

Post by SPZ1 »

I worked out a day/night system for a potential future GZDoom mod. The problem is that changing the sky texture every second seems to slow down the framerate. I think that if I could do a check for the current sky texture it might speed things up. I'm not sure though so I'm asking. I know ZScript has this feature but I can't see any good way to integrate this into my ACS.
User avatar
MartinHowe
Posts: 2052
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom

Re: GetSky for ACS

Post by MartinHowe »

The bare bones is: define a function in ZScript that does the check, and then call the function from ACS using the ScriptCall ACS function.

(Gotta leave home for work soon, so no time to flesh it out right now; but hopefully that should give you the ideas to research)
User avatar
SPZ1
Posts: 371
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois

Re: GetSky for ACS

Post by SPZ1 »

I already knew about the LevelLocals struct. I was hoping to avoid ZScript for this.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: GetSky for ACS

Post by InsanityBringer »

I'm not going to say that the functionality couldn't be useful elsewhere, but I feel like you should be able to remember what sky was last set yourself already (store the string if you're generating it at run time? or the index if you're looking it up from a big array) and do the comparison, rather than having to ask the information for something you can keep track of yourself.
User avatar
SPZ1
Posts: 371
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois

Re: GetSky for ACS

Post by SPZ1 »

That does sound like a good idea. I should have thought of it myself.

Return to “Feature Suggestions [GZDoom]”