Page 1 of 1

ACS help needed

Posted: Thu May 25, 2006 22:11
by Nash
This is a modified version of a file solarsnowfall posted awhile ago that demonstrates how to make a flashlight effect in GZDoom.

I have since modified it heavily for my project. However, after a long time, I've recently realized there's a serious bug with the implementation. The script breaks when used with hub maps.

At first, I thought that something from my edited version might be screwing things up. But then, to reconfirm things, I took the original wad file that solarsnowfall made for me, modified it a little (it was a single map; I changed stuff so it's now 2 maps in a hub), and the result was still screwed up.

Anyway, here are the three files zipped, with a description for each of them.

http://nash.wanzafran.com/lighttest_stuff.zip

lighttest.wad - the original version by soloarsnowfall. Looks good.

lighttest2.wad - after setting up hub maps. The door leads to the second map. Notice how the light glow gets stuck at 0,0 in the second map.

lighttest3.wad - replaced the acs_execute(script 6) function with acs_executealways. It seems to work in the sense that, unlike the previous file, the light is always in front of you on the second map. HOWEVER, the light is still stuck at 0,0 and it gets worse; everytime you re-enter the map, a duplicate is made at 0,0. So if you try to repeatedly switch the maps using the door, you'll end up with a bunch of dynamic lights stuck at 0,0, and ultimately; a performance hit.

Posted: Thu May 25, 2006 22:13
by Nash
Also, a small note - I'm aware that using libraries would be a better choice but I'm a little short on time now, so I threw these files together real quick.

I don't think using libraries would make the problems go away though.

Posted: Fri May 26, 2006 3:01
by chopkinsca
I'm guessing it's related to this

Posted: Fri May 26, 2006 14:38
by Nash
I see.

I've tried using older versions of GZDoom, and while the code does work as intended, there's a new problem:

Everytime I switch maps by using the door, a duplicate is spawned at the player start.

Again, going back and forth through the door many times will result in a bunch of dynamic lights stuck at the player start spot, resulting in lag due to too many dynamic lights.

Posted: Sat May 27, 2006 0:49
by Nash
EDIT:

Nevermind. I was wrong.

The script works perfectly as intended in the versions I've tested (1.0.08 and 1.0.04).

So it seems the feature is broken starting from 1.0.09 onwards.

Posted: Sat May 27, 2006 0:56
by Graf Zahl
Not surprisingly. Randy did a fix for some other bug that causes serious problems with ENTER scripts. In 1.0.09 and 1.0.10 anything regarding ENTER scripts doesn't work correctly.