Jump to content
  • 0

Increasing/decreasing transparency in screenpacks


Trinitronity

Question

Hello guys,

basically, I'm trying to make the screen flash. For that, I have a tiled sprite of a white rectangle (completely white), and I want to dynamically change its transparency through anim/actionno.

However, I have no idea how to do that. And on top of that, there exist a and a1 and probably even more variations of addalpha, but what are the differences?

Please help me out. Thanks in advance!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I think this would be the code for what you want basically?

Just change the three digit values at the [Begin Action] after the "AS" and Before the "D" the lower that value is the more transparent that animation will get (from 256 to 0)

[BG Window Flash]
type  = anim     
actionno = 30                     
start = 0, 0       
delta = 1, 1    
tile = 1,1
tilespacing = 1280, 720 
mask = 1


[Begin Action 30]
3,0, 0,0,5,,AS250D256
3,0, 0,0,5,,AS245D256
3,0, 0,0,5,,AS240D256
3,0, 0,0,5,,AS235D256
3,0, 0,0,5,,AS230D256
 

Also to tile an animations (not sure if works on screenpacks but since screenpacks and stages uses a way similar code...) just set the "tilespacing" equal to the X and Y size of the sprite/animation you want to tile for example this Flash sprite size is 1280x720 so to make tile works just set the tilespacing to 1280,720.

 

Hope that helps a bit...

Link to comment
Share on other sites

  • 0

Thanks for the transparency code. It works, but now I have a new problem. I have set animations up like this:

[VersusBG 2] ;VS Screen Flash
type  = anim
actionno = 200
start = 0,0
tile  = 1,1
layerno = 1
velocity = 0, 0

[VersusBG 3] ;VS Screen Borders
type  = anim
actionno = 210
start = 0,0
tile  = 1,1
layerno = 1
velocity = 0, 0

[VersusBG 4] ;VS Screen Flames
type  = anim
actionno = 230
start = 0,0
tile  = 1,1
laverno = 1
velocity = 0, 0

[VersusBG 5] ;VS Logo
type  = normal
spriteno = 200,0
layerno = 1 ; Front
start = 0,240
mask = 1

[Begin Action 200]
500,0, 0,0,2,,AS256D256
500,0, 0,0,2,,AS240D256
500,0, 0,0,2,,AS224D256
500,0, 0,0,2,,AS208D256
500,0, 0,0,2,,AS192D256
500,0, 0,0,2,,AS176D256
500,0, 0,0,2,,AS160D256
500,0, 0,0,2,,AS144D256
500,0, 0,0,2,,AS128D256
500,0, 0,0,2,,AS112D256
500,0, 0,0,2,,AS96D256
500,0, 0,0,2,,AS80D256
500,0, 0,0,2,,AS64D256
500,0, 0,0,2,,AS48D256
500,0, 0,0,2,,AS32D256
500,0, 0,0,2,,AS16D256
500,0, 0,0,-1,,AS0D256

[Begin Action 210] ;Placeholder spot for border intro
220,0, 0,0, -1

[Begin Action 230] ;Flames
230,0, 0,0, 4
230,1, 0,0, 4
230,2, 0,0, 4
230,3, 0,0, 4

But the screen flash still appears behind the other stuff, even though the flames appear behind the border correctly. Can someone please help me? Thanks in advance!

Link to comment
Share on other sites

  • 0
[VersusBG 2] ;VS Screen Flash
type  = anim
actionno = 200
start = 0,0
tile  = 1,1
layerno = 1
velocity = 0, 0

Move that block of code to the bottom (whatever is on the bottom is the 'front and whatever is toward the top is the 'back' in terms of layering)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...