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.
ACS help needed
Moderator: Graf Zahl
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
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.
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.
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact: