forums

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

04-23-2003 17:13

Posted by:
MapMaker

Location:
Edmonton, Alberta (Canada)

Click Here to Email MapMaker   Find more posts by MapMaker

Hi again.
I am making a game (duh), and I want to have the mouse sprite fade in and out. I have the sprite in place of the mouse, and I have the code.....

procedure mouse()
fademouse()
set sprite transparency 0,fadenum
Sprite 0,Mouse X - 12,Mouse Y - 12,16
end proc

procedure fademouse()
if fadenum=0
uset=1
end if
if uset=1
for num=0 to 100
fadenum=(fadenum+(1/40))
if fadenum=100
uset=0
dset=1
end if
next num
end if
if dset=1
for num=0 to 100
fadenum=(fadenum-(1/40))
if fadenum=0
uset=1
dset=0
end if
next num
end if
end proc

...... to fade the mouse sprite in and out, but it dosnt do anything. I know the script works, because I tell it to "print fadenum" inside the "for" loops, and it counts up to 100, and then back down, which is what it is suppost to do. Bu what I don't understand is that the code "set sprite transparency 0, fadenum" dosnt work, no matter where in the script I put it. Anyone know why?

04-23-2003 23:49

Posted by:
No Frills

Click Here to Email No Frills   Find more posts by No Frills

erm......

you haven't used the 'draw frame' command anywhere in that lot - is that the problem?

04-24-2003 01:35

Posted by:
MapMaker

Location:
Edmonton, Alberta (Canada)

Click Here to Email MapMaker   Find more posts by MapMaker

..........

well, see my ahhhh thread.

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.