GetSky for ACS
Moderator: GZDoom Developers
-
- Posts: 371
- Joined: Wed Aug 02, 2017 3:01 pm
- Location: Illinois
GetSky for ACS
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.
-
- Posts: 2052
- Joined: Mon Aug 11, 2003 1:50 pm
- Location: Waveney, United Kingdom
Re: GetSky for ACS
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)
(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)
-
- Posts: 371
- Joined: Wed Aug 02, 2017 3:01 pm
- Location: Illinois
Re: GetSky for ACS
I already knew about the LevelLocals struct. I was hoping to avoid ZScript for this.
-
- Posts: 3392
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
Re: GetSky for ACS
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.
-
- Posts: 371
- Joined: Wed Aug 02, 2017 3:01 pm
- Location: Illinois
Re: GetSky for ACS
That does sound like a good idea. I should have thought of it myself.