Common Serialization (Saving) Pitfalls
Re: Common Serialization (Saving) Pitfalls
Yes. It would be quite difficult to use ScriptComponent usefully if functions could not be saved and loaded.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: Common Serialization (Saving) Pitfalls
Makes sens. I feared it could be somehow excluded from saved games and reloaded directly from the dat file (without overwriting other variables from the script... I have strange ideas sometimes).
Re: Common Serialization (Saving) Pitfalls
I'm confused about the minimal savestate: if the rock item was minimal savestate, and I used this script:
outside of a function, wouldn't it set rock_1 at WorldPositionY 1 every time they load the game?
Code: Select all
rock_1:setWorldPositionY(1)
Grey Island mod(WIP): http://www.grimrock.net/forum/viewtopic ... 99#p123699
Re: Common Serialization (Saving) Pitfalls
No.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.