Prowler Productions
  Dink Smallwood Forum
  Checking for scripts

Post New Topic  
profile | register | faq

Author Topic:   Checking for scripts
FF4LIFE posted 10-14- 03:51 AM CT (US)   Click Here to See the Profile for FF4LIFE   Click Here to Email FF4LIFE  
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.

FF4LIFE posted 10-14- 04:02 AM CT (US)     Click Here to See the Profile for FF4LIFE  Click Here to Email FF4LIFE     
Hey, nevermind that, I figured it out. What apparently had happened is since I checked &magic_level RIGHT when you entered the screen, the global script keeping &magic_level at the same number had not kicked in yet, so I added a little wait at the start of the map's script to give it time to get going. I'm not sure if I will need to make the number bigger so that other people's computers will do it right, or if its even off the computers speed. All I know is that by adding a little wait. Yay!

Post New Topic  Post Reply
Hop to:


Contact Us | Prowler Productions

Powered by: Ultimate Bulletin Board, Freeware Version 5.10a
Purchase our Licensed Version- which adds many more features!
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.