|RandyD||Question: Does the "add.to.pic" command take up any extra memory each time it is used? For example, if I load a view into memory and add it to the game in the form of several static objects it will obviously take up some memory. However, if I add it to the background using the "add.to.pic" command instead of creating the objects, will it also take up memory or is that memory freed up once it is part of the background image (i.e. will the game run out of memory if I keep adding the same small view to the background?)|
whenever you call add.to.pic.. it'll add it to the script.. the small buffer used by the interpeter to ensure that the room is in the same state next time you restore a game.|
it doesn't check for duplicates though.. so eventually the script will be filled.
depending on what you want to do.. it's probably possible to save to script the first time you use add.to.pic and then disable for the others.
|RandyD||When you say disable the script saving function what exactly are you referring to? I mean I would like to be able to add.to.pic the same image several times, yet it is not crucual that this be remembered. So if ego leaves the room and comes back, it's okay that none of the elements that have been added to the pic are redrawn the way they were when ego left the room. So in this regard it looks like I can disable the script saving function. However, I do not want to lose anything that ego might have done in the room (such as pick up inventory objects, set flags and variables...). Would this information also be lost if the script saving function were diabled for that room?|
script functions only save resource accessing.. like loading/discarding.. drawing/showing/adding to pictures. and only for saving/restoring games.. it won't affect what happens when new.room is called.|
If you're interested, check out