Difference between revisions of "Talk:Variables and Properties"
Jump to navigation
Jump to search
Talk:Variables and Properties (edit)
Revision as of 08:57, 12 February 2017
, 08:57, 12 February 2017→Adding Properties on Script in Current Game
imported>Marth (→Adding Properties on Script in Current Game: new section) |
imported>Lisselli |
||
Line 218: | Line 218: | ||
Apparently deleting properties is a bad idea, these will continue to persist in a save game and can cause problems, but adding properties, through amending a script on a Base Item, to already loaded or baked in objects has the effect of not filling the properties. this can cause alot of unnecessary stuff placed on the stack and your script will fail to work correctly. if you have alot of properties or those properties are used numerous times in your script, then every time that property shows up it will throw an error causing alot of congestion for the VM. calling other scripts off the base script is one work around. may seem obvious to some, but a bad idea that will only work on new games. | Apparently deleting properties is a bad idea, these will continue to persist in a save game and can cause problems, but adding properties, through amending a script on a Base Item, to already loaded or baked in objects has the effect of not filling the properties. this can cause alot of unnecessary stuff placed on the stack and your script will fail to work correctly. if you have alot of properties or those properties are used numerous times in your script, then every time that property shows up it will throw an error causing alot of congestion for the VM. calling other scripts off the base script is one work around. may seem obvious to some, but a bad idea that will only work on new games. | ||
From my understanding, all properties are baked into the save the moment the game is loaded. ObjectReferences tend to be a bigger issue because the properties pointing at them, will make them persistent. So in practice, one should use ObjectReference properties when absolutely necessary, and never no more than what you need. There's a clearer info on this but the page is inaccessible at the moment. --[[User:Lisselli|Lisselli]] ([[User talk:Lisselli|talk]]) |