Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Seiat

Save/Load Game Issue

Recommended Posts

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.

Share this post


Link to post
Seiat said:

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).

Share this post


Link to post

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

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×