ACS help needed

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

ACS help needed

Post 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.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post 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.
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

I'm guessing it's related to this
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post 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.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post 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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post 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.
Locked

Return to “GZDoom”