Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / DBC-deleting sprites

Author
Message
UFOs other account lol
19
Years of Service
User Offline
Joined: 3rd Jun 2005
Location: Somewhere :)
Posted: 3rd Oct 2005 01:35 Edited at: 9th Oct 2005 20:35
okay, this is pretty sad, but I can't get rid of all the sprites in my game. Could you help? The part where I delete all the sprites is at the bottom of the code.


Green Bunnies rule!
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd Oct 2005 03:32
It's either down to the value of Lasers not being the correct value if all your sprites are not being deleted - or they are and you aren't setting the sprite's background to be automatically replaced.

If the first:

In your function wingame, on the line after stop music 1, put an End statement.

When the program stops and drops to the CLI, typ Print Lasers and press return. See what value it prints and check that it's what it should be.

If it's the second:

Try moving the sprites off the screen by positioning them at position -100,100 for example before deleting them.

TDK_Man

UFOs other account lol
19
Years of Service
User Offline
Joined: 3rd Jun 2005
Location: Somewhere :)
Posted: 4th Oct 2005 16:21 Edited at: 9th Oct 2005 20:35
Okay, I figured it out. It seems that variables outside of functions don't work in functions unless you put them in the call function cammand thing, like Wingame(lasers). So I did that and it works now! Your idea of what the problem helped. Thanks.

Green Bunnies rule!

Login to post a reply

Server time is: 2024-11-13 21:04:22
Your offset time is: 2024-11-13 21:04:22