forums

TNT Basic Forums > Programming Q&A
Sprite Off
< Last Thread     Next Thread >
Author
Thread        Post A Reply

11-05-2002 04:51

Posted by:
Jamie

Find more posts by Jamie

When I call the command:

Sprite off x

The sprite I want to turn off disappears but a button from my splash screen pops up on my screen. Has any one seen this before or have any idea why/what to do about it?

thanks

11-10-2002 11:34

Posted by:
mark_667

Find more posts by mark_667

Sprite off command

In Hierolgyph, a sprite can be taken off screen by using the command 'sprite off'. If there are more than one they can be listed
e.g. sprite off 0,1,2,3

However, when I try this method, the end number is always highlighted as an error, and the only way to get around this is to write it:

sprite off 0
sprite off 1
sprite off 2

This adds a lot of unnescary lines of code to my project, and more inefficient and annoying, as it should work. Is there something I'm missing?
Thanks in advance for your help, Mark

PS. Is there anyway of finding a sprites' pixel or map co-ordinates after been moved from the default position, as this would really help with a 'pause' function I am hoping to implement.

11-12-2002 21:20

Posted by:
Mark Tully

Find more posts by Mark Tully

Sprite off only takes 1 sprite to turn off, you can't pass multiple ones. If you omit a sprite number, it turns of all sprites at once. If you know the numbers of the sprites you're going to delete, you could use a read loop like this:

int spritenum

do
read spritenum
if spritenum<>-1 then sprite off spritenum
while spritenum<>-1



....

.....

' sprite numbers
data 1,2,3,4,5,7,10,54,23,35,52,21,23,-1

To answer your second question, you can set the sprites x and y position at any time using the 'sprite x' and 'sprite y' functions, and get the sprites image using the 'sprite i' function.

Cheers,

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.