Jump to content

Is it possible to store objects' scripts variable values to the savegame?


hexef

Recommended Posts

Say I have a scripted NPC type object with over 1000 references in the world.How would I make it so I can store in the savegame file the variables info for each reference of the object in the world.For example,if I have a "int DoOnce"(and a block of code that repeats only once) in the script,can I make it so every reference in the game has its unique DoOnce variable value stored in the save file,is it possible?

Edited by xqdcss
Link to comment
Share on other sites

it already happens. if you create more instances of the same npc which has a script attached, every script will run on a different instance. So the DoOnce of a npc will be for him only, another npc will have its own DoOnce. I hope I understood what you mean.

Link to comment
Share on other sites

Wow I never knew about that...I thought that only quest scripts variables get stored into the savegame,thanks a lot for clearing this up for me.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...