SisRob Posted March 18, 2015 Share Posted March 18, 2015 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 More sharing options...
dkluin Posted March 18, 2015 Share Posted March 18, 2015 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 More sharing options...
SisRob Posted March 18, 2015 Author Share Posted March 18, 2015 (edited) The thing is I need those objects to stay on the map for whole game and so I don't know when I should destroy them... Maybe remove them on save? Can cleo do this? Edited March 18, 2015 by SisRob Link to comment https://gtaforums.com/topic/777371-spawned-objects-are-saved/#findComment-1067152974 Share on other sites More sharing options...
ZAZ Posted March 18, 2015 Share Posted March 18, 2015 (edited) 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 thatIt'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 March 18, 2015 by ZAZ Link to comment https://gtaforums.com/topic/777371-spawned-objects-are-saved/#findComment-1067153014 Share on other sites More sharing options...
SisRob Posted March 18, 2015 Author Share Posted March 18, 2015 Thanks, ZAZ. I guess the mystery is solved, then Link to comment https://gtaforums.com/topic/777371-spawned-objects-are-saved/#findComment-1067153163 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now