I hope this is the right forum for my question.
I am working on a project and have been encountering some rather serious bugs that I am having difficulty fixing.
My working hypothesis is that my scripts for an individual sprite have gotten much too long and are the source of my bugs.
What is happening is that I have specific events that occur when a certain action takes place. In this particular case, when the "spacebar" is pressed. The problem is that when the "spacebar" is pressed, the correct action that should happen as a result, will take place for one sprite, but will only occasionally take place for the other sprites.
Sometimes all sprites will act as they are supposed to, but not always.
My best guess is that because of the length of the scripts, that when I press the spacebar, depending on where the computer is executing a script, by the time the computer gets around to the sprite that "should" be reacting, the sprite has moved on and the condition is not met.
Has anyone else experienced significant lag and bugs because of the length of their scripts? And if so, what is the optimal length of a script within a sprite to minimize this effect?
Here is a link to the project containing said bugs.
If you look at my other project, specifically Quidditch0.2, the bugs are not present.
Any ideas or thoughts would be greatly appreciated.
Thanks
Offline