Seiat Posted March 22, 2013 I'm curious about a save/load game problem I'm having with my latest doom tower defense project. Basically, after laying out your sentries, they'll start killing monsters which gives you money by using A_GiveToTarget in the monsters' death states. Normally this works as intended. But if you happen to save your game, then reload, those sentries will no longer give you money for their kills. Did a bit of research and found this: http://doomwiki.org/wiki/Targets_not_preserved_in_saved_games I think it may be a similar memory access problem, though I'm really not 100% on that. I'm pretty sure if I replaced every A_GiveToTarget action function with ACS_ExecuteWithResult, then scripted each possible cash amount you could get and set it to go directly to the player instead of through your sentries, I could fix the problem... But the amount of work and time involved with that at this point makes my modding spirit die just a little bit more every time I think of doing it. Plus, using so much ACS would probably have a negative impact on performance. Has anyone come across a similar issue and found a simpler way to work around this? Any input would be greatly appreciated. 0 Share this post Link to post
Blue Shadow Posted March 22, 2013 Seiat said:Did a bit of research and found this: http://doomwiki.org/wiki/Targets_not_preserved_in_saved_games That issue doesn't exist in ZDoom and derivatives, so it couldn't be it. Basically, after laying out your sentries, they'll start killing monsters which gives you money by using A_GiveToTarget in the monsters' death states Unless I'm missing something, A_GiveToTarget will give the item to the killer; the monsters' killer in this case are the sentries. That means the item will be given to the sentries, not you (the player). 0 Share this post Link to post
Seiat Posted March 22, 2013 ...Well that wouldn't explain why it works fine before loading a saved game, and not after. I'm not saying it's the exact same issue either, just similar in nature. I'm guessing there's a certain master/sibling sort of relation set between the player and the sentry, seeing as you spawn sentries from an inventory item. Re-loading seems to destroy that relation. 0 Share this post Link to post