SPUD icon indicating copy to clipboard operation
SPUD copied to clipboard

runtime actor store and restore by cell

Open CrazyDogJ opened this issue 1 year ago • 5 comments

add a new actor that can store or restore when world partition cell unloaded or loaded clean up delegates

CrazyDogJ avatar Sep 11 '24 15:09 CrazyDogJ

Could you explain more about why this is necessary vs using the world partition support that's already there? I don't use WP myself so I'm not sure what the benefits of this are.

sinbad avatar Sep 12 '24 11:09 sinbad

The plugin now has pretty good support for world partition, and i can save runtime actors when i mannully save the game. However, when the cell is unloaded, the plugin only saves the Actors already in the level when destroyed by the streaming level. I am trying to script a Inventory System and the player is able to drop items in the world. That means items are runtime actors. These items with physics may "drop" out of world when cell unloaded. So i make these changes, and i sincerely hope that can help you. (sorry for my bad english :P)

CrazyDogJ avatar Sep 12 '24 14:09 CrazyDogJ

I have implemented a somewhat similar system for the game I'm working on too. It's certainly something that's currently missing from SPUD.

cyphusx avatar Sep 12 '24 14:09 cyphusx

OK great, thanks for the explanation! I might tweak it a little, perhaps the name of the base class should be specific to world partition so it's clearer why you'd use it.

sinbad avatar Sep 12 '24 14:09 sinbad

OK great, thanks for the explanation! I might tweak it a little, perhaps the name of the base class should be specific to world partition so it's clearer why you'd use it.

You are right, the class name should be more intuitive. Also i am not a professional programmer, so these changes might not be a perfect solution, just a concept. (Q~Q)

CrazyDogJ avatar Sep 12 '24 15:09 CrazyDogJ

I would suggest converting that to a component, so different base actor classes can be used.

krojew avatar Sep 25 '24 05:09 krojew

Superceded by #99

sinbad avatar Oct 15 '24 10:10 sinbad