TNT Basic Forums > Programming Q&A
Sprite off or better command
< Last Thread     Next Thread >
Thread        Post A Reply

04-03-2004 17:35

Posted by:
Leorik The Creator


Find more posts by Leorik The Creator

I have a problem when making my space game here it is : when the player shoot the missile and the missile touch a rock then the missile should dissapear ,

for that i used sprite off missilesprite but when the missile touch the rock, the missile become an another sprite...

so there is a better command to "erase a sprite" and could work in my game ???



04-03-2004 18:45

Posted by:


Click Here to Email eekaydee   Find more posts by eekaydee

There's probably a sprite call in your game loop, which turns the sprite right back on after you turn it off. You have to make sure you only draw the sprite when you want it on. Try making a variable to tell whether the missile should be on or off:

int drawMissle=true

if drawMissle=true
sprite 100,x,y, image
end if

04-06-2004 14:57

Posted by:


Click Here to Email JW   Find more posts by JW

Yes, same solution here...
Also check the real number of missilesprite, see if it's not the same as the other sprite..?

sprite off (sprite number) is the best solution. Another solution might be setting the transparent setting to invisible. (but you probably don't want to do that)

Do you have screenshots of the shooter game allready ?


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.