Originally Posted by Abraxas*
Note sure if I understand you right. Can you elaborate a bit?

If I understood your post before, local object's variables are forever kept in the save file once they are added, even after the player leaves their level. Yet, the variables reinitialize on level load. So, if the object has a script with an event like this:
Code
EVENT OneshotEvent
VARS
    INT: _Flag = 0
ON
    OnInit()
ACTIONS
    IF "c1"
        IsEqual(_Flag, 0)
    THEN
        Set(_Flag, 1)
        CallFunction("DoSomething")
    ENDIF

The function will potentially be called more than one time, because _Flag will reinitialize to zero, even though the game may have saved _Flag as 1. This would even be the case if _Flag was instead %Flag--defined as a global variable instead.


Originally Posted by Abraxas*
From my testings this only applies to the character's BEHAVIOUR

Thanks for the clarification!


Originally Posted by Abraxas*
Thanks for the Destroy hint. I regarded it for testing and, indeed, it makes a big difference!

Looking forward to the post smile I have a system in place within Epic Encounters to take advantage of this--deleting characters who have died during combat-- but I was afraid to start deleting creatures on a broad scale due to the potential for deleting an NPC that would be used in some way after death. As a trial, I instead set them OffStage, and there haven't been any bug reports with just that for a couple months.


Originally Posted by Tinkerer
That is correct! And it's still the same in DOS2.

Hey Tinkerer smile Thanks for the confirmation!

Last edited by Ameranth; 20/08/17 02:53 PM.