So I'm using a common event to manipulate some variables. This common event is called by an item, so it's not like it's supposed to be running all the time and something's getting jammed up there.
Now, what seems to be happening is that every time I want this common event to manipulate a variable and then NOT DO ANYTHING ELSE, it has a conniption fit and manipulates the variable A WHOLE BUNCH OF TIMES, causing insane lag and a crapload of logic errors.
I have a simple If/Else statement. If it evaluates to True, I want the event to set a certain variable to 100. If it evaluates False, I want the event to subtract 10 from the variable's value. (And yes, I am making sure the variable is already set to Something More Than 0 before this common event is able to be called.)
That's it. I want the event to end as soon as the variable is changed one way or the other. I do not want to display any text about it, etc.
Now, like I said, the engine does not seem to like this. When I use the item and call the common event under conditions that make my If/Else evaluate true, there's about a second and a half freeze, and then the variable is set correctly. But when I call the event under conditions that should make the If/Else evaluate FALSE, there's the same lag, and the variable is set to something like -90,0640 (I am not exaggerating. Interestingly, the value the variable gets set to is not always the same, though it's always somewhere around -90,000). Which tells me that instead of simply setting the variable ONCE, it is doing it an ungodly number of times.
I have no idea WHY this is happening, or how to stop it. The operation works fine if I copy and paste the code into an event on the map. The problem is only happening with the common event called by the item. It happens with zero plugins active, and it happens with the full VisuStella suite + Community Lighting and a few other things. It happens in a BRAND NEW PROJECT. (And yes, I am running the latest version of everything.)
IT DOES NOT HAPPEN, HOWEVER, IF I TELL THE GAME TO DISPLAY A TEXT BOX AFTER MANIPULATING THE VARIABLE
It DOES still happen if I tell it to play a sound effect, or to Exit Event Processing, or to Break Loop (a longshot, I know, but I thought it was worth a try).
Does anybody know wtf is going on here?? Is it a bug in the engine? Am I doing?? something??? wrong? I feel like I've seen or heard of something similar to this happening before, but Google and my memory are both failing me.
Now, what seems to be happening is that every time I want this common event to manipulate a variable and then NOT DO ANYTHING ELSE, it has a conniption fit and manipulates the variable A WHOLE BUNCH OF TIMES, causing insane lag and a crapload of logic errors.
I have a simple If/Else statement. If it evaluates to True, I want the event to set a certain variable to 100. If it evaluates False, I want the event to subtract 10 from the variable's value. (And yes, I am making sure the variable is already set to Something More Than 0 before this common event is able to be called.)
That's it. I want the event to end as soon as the variable is changed one way or the other. I do not want to display any text about it, etc.
Now, like I said, the engine does not seem to like this. When I use the item and call the common event under conditions that make my If/Else evaluate true, there's about a second and a half freeze, and then the variable is set correctly. But when I call the event under conditions that should make the If/Else evaluate FALSE, there's the same lag, and the variable is set to something like -90,0640 (I am not exaggerating. Interestingly, the value the variable gets set to is not always the same, though it's always somewhere around -90,000). Which tells me that instead of simply setting the variable ONCE, it is doing it an ungodly number of times.
I have no idea WHY this is happening, or how to stop it. The operation works fine if I copy and paste the code into an event on the map. The problem is only happening with the common event called by the item. It happens with zero plugins active, and it happens with the full VisuStella suite + Community Lighting and a few other things. It happens in a BRAND NEW PROJECT. (And yes, I am running the latest version of everything.)
IT DOES NOT HAPPEN, HOWEVER, IF I TELL THE GAME TO DISPLAY A TEXT BOX AFTER MANIPULATING THE VARIABLE
It DOES still happen if I tell it to play a sound effect, or to Exit Event Processing, or to Break Loop (a longshot, I know, but I thought it was worth a try).
Does anybody know wtf is going on here?? Is it a bug in the engine? Am I doing?? something??? wrong? I feel like I've seen or heard of something similar to this happening before, but Google and my memory are both failing me.