Jump to content

Spawned objects are saved


Recommended Posts

Hello,

I've noticed that the spawned objects (0107) are saved when player saves the game.
It seems that while position & angle of objects are saved, other parameters like mass or liftable flag aren't.
This makes my mod to create new objects at each load, meaning the more player saves the more (unnecessary) objects are saved in his save file :(
Is this expected behaviour?
Link to comment
https://gtaforums.com/topic/777371-spawned-objects-are-saved/
Share on other sites

 

Hello,

I've noticed that the spawned objects (0107) are saved when player saves the game.
It seems that while position & angle of objects are saved, other parameters like mass or liftable flag aren't.
This makes my mod to create new objects at each load, meaning the more player saves the more (unnecessary) objects are saved in his save file :(
Is this expected behaviour?

 

Remove and unload the objects, when you don't need them.

Remove it inmediately

0108: destroy_object $WANTED_LIST_OBJECT

Remove it when the player looks away

01C4: remove_references_to_object 82@(39@,16i) // This object will now disappear when the player looks away
Link to comment
https://gtaforums.com/topic/777371-spawned-objects-are-saved/#findComment-1067152760
Share on other sites

This makes my mod to create new objects at each load, meaning the more player saves the more (unnecessary) objects are saved in his save file :(

Is this expected behaviour?

yes and we should prevent that, or give accurate informations about that

It's an important fact for scripter to know that, especially for cleo scripts, that placements of objects, pickups, Icon Markes, parked_car_generators will be saved by making savegame, if they were forgotten to remove

Cleo scripts have then this effect, when making savegame and load then this savegame, to spawn duplicate items, because *.cs file starts allways by same startup

Edited by ZAZ
Link to comment
https://gtaforums.com/topic/777371-spawned-objects-are-saved/#findComment-1067153014
Share on other sites

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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.