LoginLogin

How do I fade in and out sprites?

Root / Programming Questions / [.]

RNGesusCreated:
How do I fade in and out sprites? I am trying to make some special effects in FNaFSB and I need to fade in and out sprites.

I thought you were able to mess with the opacity of a sprite can't you? I wouldn't know I don't usually mess with sprites, just throwing out ideas.

Maybe use graphic commands and FADE? From previous experimentarion I was able to to this with graphics with the help of a FOR loop and some math. Or you could place sprites with increasing opacity over the main sprites? You would only have to allocate maybe four or five sprite blocks for this. Like ElzoBro I'm just thrown' out ideas.

I had this problem before but solved it. Here's a key-qr2544td Very simple but you might want to edit it to be more efficant and fit into fnafsb. All I did was have a layering and use spcolor and sphide

I had this problem before but solved it. Here's a key-qr2544td Very simple but you might want to edit it to be more efficant and fit into fnafsb. All I did was have a layering and use spcolor and sphide
Here's my solution inspired by your code.
SPSET 0,510
SPOFS 0,100,100
FOR I=1 TO 255 STEP 1  'note A
SPCOLOR 0,RGB(I,255,255,255)  'note B
VSYNC 1
NEXT

'note A: change STEP 1 to 2 or 3 for a faster fade
'note B: change RGB(I,...) to RGB(255-I,...) to fade out

I had this problem before but solved it. Here's a key-qr2544td Very simple but you might want to edit it to be more efficant and fit into fnafsb. All I did was have a layering and use spcolor and sphide
Here's my solution inspired by your code.
SPSET 0,510
SPOFS 0,100,100
FOR I=1 TO 255 STEP 1  'note A
SPCOLOR 0,RGB(I,255,255,255)  'note B
VSYNC 1
NEXT

'note A: change STEP 1 to 2 or 3 for a faster fade
'note B: change RGB(I,...) to RGB(255-I,...) to fade out
Thanks mate, less coding to do this way than my super long way

Ok, thanks! FNaFSB will now be a LOT more polished than it was.