forums

TNT Basic Forums > Programming Q&A
sprit off
< Last Thread     Next Thread >
Author
Thread        Post A Reply

02-26-2004 18:55

Posted by:
puffin

Click Here to Email puffin   Find more posts by puffin

when i use sprite off, instead of removing the sprites from the screen it just leaves them sitting. is this how it's supposed to work? if so, do i just have to paint the canvas after every call to draw frame so that they're erased, or is there a better way?

02-26-2004 20:39

Posted by:
madscientist

Location:
n.ireland

Click Here to Email madscientist   Find more posts by madscientist

more than likely youre drawing the sprite after after killing it.


look in the main game loop for the bit where you draw the sprite and add a line
if killed=false then sprite 1,x,y,001

and when you go to remove it

sprite off
killed=false

02-26-2004 21:57

Posted by:
charlie

Location:
norfolk, england

Click Here to Email charlie   Find more posts by charlie

or if your using arrays i have a variable called something like spriteexists, and only display sprites if they exist.

02-27-2004 00:52

Posted by:
puffin

Click Here to Email puffin   Find more posts by puffin

yeah, i fixed it. i just tossed this in:

if particleDead = false
sprite i, particleX, particleY, 0
end if

03-04-2004 19:31

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

There's also a Sprite Exists command that you can use to tell if a sprite is on or not.

Mark

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.