forums

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

08-21-2003 23:36

Posted by:
Stephen Lund

Location:
Michigan USA

Click Here to Email Stephen Lund   Find more posts by Stephen Lund

Hi

Is there a way to make a sprite get bigger and smaller if there is a way can you gave me an example

Thanks,
Stephen

08-22-2003 07:05

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

You can use sprite scaling in hardware mode:

quote:

Graphics mode HARDWARE 800,600
Load images 128
float size=1, sizeChange=0.1
int spriteID=0
repeat
sprite spriteID,100,100,0
set sprite x scale spriteID,size
set sprite y scale spriteID,size
draw frame

size=size+sizeChange
if size>2
size=2
sizeChange=-sizeChange
else if size<0.5
size=0.5
sizeChange=-sizeChange
end if
until mouse button


The sprite uses image 0 in image bank 128.

Hope this helps.

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.