posted 10-14- 03:51 AM CT (US)
Hey, does anyone know a really good way to check if a script is running that isn't attached to a sprite? It's easy if it is, but this is a script that just spawns and stays up. I have it attached to the room with the savebot, so when you go it spawns, but I want it so when you go back it doesn't spawn. It doesn't really do any harm, but too many would slow the game. I thought of checking for a script on a random sprite, and if it has no script giving it one and spawning the global script. Then if it checks for a script on the sprite there is one, so it doesn't spawn the global script. Problem there is if you leave the screen it doesn't still have the script attached. Anyone know of a way to give it a script and have it stay forever?
I also thought of checking &magic_level. What my script does is it keeps &magic_level in a certain place so that the bar never moves. So I'd check &magic_level, wait a sec, check it again, and if they were different the script wasn't running so i spawned it. Pretty sly, huh? This seemed to work, but when &magic_level was 0 for some reason it would randomly botch up and read 10 first, then 0, and spawn it again. If nobody can think of a better meathod than this i'll have to tweek with it a bit more and see if i can get it.
Thanks for putting up with my crazy questions! It'll all be worth it one day.