Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 793 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Panel Fading Problems #212559
06/23/08 01:06
06/23/08 01:06
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
Hi, i know this has been asked and solved a billion times before but i searched and can't find it and i just can't figure it out. How do you make a panel fade away. I have the "logolite.pcx" as my splash screen, then my title screen comes up which is a black background and letters. I have my black background (which by the way is i bmp) set as a panel with the alpha of 100. Here is my code.
Code:
 bmap startup_screen = <startup.bmp>;
panel start_screen
{
bmap = startup_screen;
alpha = 100;
flags = transparent, refresh;
}

function main()
{
...
...
start_screen.visible = on;
fade();
...
...
}

function fade()
{
while (start_screen.alpha > 0)
{
start_screen.alpha -= time;
wait(1);
}
} 


when my start up screen shows, "logolite.pcx" is still visible in the background due to the "transparent" flag, which i read in the manual, has to be set in order for this to work.

WTF am i doing wrong?

Re: Panel Fading Problems [Re: xbox] #212561
06/23/08 01:08
06/23/08 01:08
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
Oh and it still DOESN'T FADE AWAY

Re: Panel Fading Problems [Re: xbox] #212567
06/23/08 03:13
06/23/08 03:13
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline
User
JazzDude  Offline
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Code:
bmap screen_fade = <black_total.pcx>;	
panel fade_pan
{
	bmap = screen_fade;
	pos_x = 0;
	pos_y = 0;
	layer = 10;
	flags = refresh,d3d;
}

function fade_in()
{
	bmap_for_screen(screen_fade,1,0);
	fade_pan.bmap = screen_fade;
	//Now show the screenshot:
	fade_pan.alpha = 100;
	fade_pan.visible = on;
	wait(5);
	//Now fade the screenshot out:
	fade_pan.transparent = on;

	while(fade_pan.alpha > 0)
	{
		fade_pan.alpha -= 10*time_step;
		wait(1);
	}
	fade_pan.visible = off;
} 


Place this function before the panel you wish to fade into.

Re: Panel Fading Problems [Re: JazzDude] #212583
06/23/08 08:01
06/23/08 08:01
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
set it's alpha to 99 before you start fading, that should work.

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: Panel Fading Problems [Re: Helghast] #212656
06/23/08 16:27
06/23/08 16:27
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
it still doesn't work

Re: Panel Fading Problems [Re: xbox] #212723
06/23/08 22:21
06/23/08 22:21
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
Which would be better, if i tried even harder to get the panel fading to work, or if i used windows movie maker and made a short mpg clip of the bmap fading like i want it?

Re: Panel Fading Problems [Re: xbox] #212734
06/23/08 23:36
06/23/08 23:36
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Try harder, definately.


Click and join the 3dgs irc community!
Room: #3dgs
Re: Panel Fading Problems [Re: Joozey] #213073
06/25/08 17:43
06/25/08 17:43
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
Yeah, i have tried every thing i could possibly think of and nothing is working.
i have even tried to set the panel its self to alpha 50 and run it without using the fading functions but there is still no change. This is what i tested.
Code:
 bmap startup = <startscreen.bmp>;
panel start_up
{
bmap = startup;
alpha = 50;
flags = transparent, refresh;
}

function main()
{
...
start_up.visible = ON;
} 


It acts like it completely ignores the alpha line and just displays what it wants to.

Re: Panel Fading Problems [Re: Joozey] #213074
06/25/08 17:44
06/25/08 17:44
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
Yeah, i have tried every thing i could possibly think of and nothing is working.
i have even tried to set the panel its self to alpha 50 and run it without using the fading functions but there is still no change. This is what i tested.
Code:
 bmap startup = <startscreen.bmp>;
panel start_up
{
bmap = startup;
alpha = 50;
flags = transparent, refresh;
}

function main()
{
...
start_up.visible = ON;
} 


It acts like it completely ignores the alpha line and just displays what it wants to.

Re: Panel Fading Problems [Re: xbox] #213155
06/26/08 03:13
06/26/08 03:13
Joined: Apr 2006
Posts: 624
DEEP 13
badapple Offline
User
badapple  Offline
User

Joined: Apr 2006
Posts: 624
DEEP 13
dont use alpha inside panel brackects

put it in function main maybe
start_up.alpha=50;

Page 1 of 3 1 2 3

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1