forums

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

06-01-2007 17:52

Posted by:
tksp

Find more posts by tksp

this is my first attempt at doing this myself and im trying to make a yellow triangle fly around which works pretty well but the sprite ive drawn keeps appearing in the top left heres the code i used to draw the sprite

graphics mode hardware 640,480
hide mouse

set pen colour to yellow
fill poly 0,0 to 9,0 to 5,18 to 0,0
copy image 0,0,9,18,true to 0

float x=320,y=240
sprite 0,x,y,0
draw frame

which does what i ask it to, a yellow triangle appears in the middle of the screen but theres also one in the top left corner does anyone know how to get rid of this? am i doing anything wrong?

06-01-2007 21:50

Posted by:
swagIT

Location:
Great Wet North (Vancouver)

Find more posts by swagIT

I think it is becasue you have drawn the yellow triangle to the top left of the canvas with your "fill poly" commnd

set the pen colour to black and paint the canvas to erase the yellow poly


this worked for me

window mode 640,400'===added

set pen colour yellow
fill poly 0,0 to 9,0 to 5,18 to 0,0'===changed
copy image 0,0,9,18,0,true to 0
'=======================added stuff
set pen colour black
paint canvas
'======================= end of added stuff
float x=320,y=240
sprite 0,x,y,0
draw frame

wait mouse click"'====added


cheers

barry

06-01-2007 23:18

Posted by:
tksp

Find more posts by tksp

thanks for the help

06-01-2007 23:45

Posted by:
swagIT

Location:
Great Wet North (Vancouver)

Find more posts by swagIT

anytime

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.