Gamestudio Links
Zorro Links
Newest Posts
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
2 registered members (AndrewAMD, degenerate_762), 1,309 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
Screen transitions #158720
10/05/07 00:21
10/05/07 00:21
Joined: Jul 2006
Posts: 91
Florida, USA
Knuckles Offline OP
Junior Member
Knuckles  Offline OP
Junior Member

Joined: Jul 2006
Posts: 91
Florida, USA
How do I make the screen fade in and out to black?

Re: Screen transitions [Re: Knuckles] #158721
10/05/07 00:36
10/05/07 00:36
Joined: Apr 2006
Posts: 624
DEEP 13
badapple Offline
User
badapple  Offline
User

Joined: Apr 2006
Posts: 624
DEEP 13

this is a q and a from the aums that might help or you could use a panel (black)
and decrease or increase its alpha


Q: How can I smoothly fade one view into another?
A: Use the code below:

view second_camera{}
action set_second_camera // place any entity in the level and set its proper position and orientation
{
my.invisible = on;
my.passable = on;
wait (3);
second_camera.pos_x = 0;
second_camera.pos_y = 0;
second_camera.size_x = screen_size.x;
second_camera.size_y = screen_size.y;
second_camera.alpha = 0;
second_camera.transparent = on;
camera.alpha = 100;
camera.transparent = on;
second_camera.x = my.x;
second_camera.y = my.y;
second_camera.z = my.z;
second_camera.pan = my.pan;
second_camera.tilt = my.tilt;
second_camera.roll = my.roll;
}

function toggle_cameras()
{
second_camera.visible = on;
while (second_camera.alpha < 99)
{
second_camera.alpha += 2 * time;
camera.alpha -= 2 * time;
wait (1);
}
camera.visible = off;
second_camera.transparent = off;
}

on_t = toggle_cameras;

Re: Screen transitions [Re: badapple] #158722
10/05/07 02:04
10/05/07 02:04
Joined: Jul 2006
Posts: 91
Florida, USA
Knuckles Offline OP
Junior Member
Knuckles  Offline OP
Junior Member

Joined: Jul 2006
Posts: 91
Florida, USA
Well I'm not using cameras, I'm just using a simple JPG image. I tried this:


Code:
bmap the_end <the_end.jpg>;

panel the_end_screen
{
layer = 4;
bmap = the_end;
scale_x = 1.6;
scale_y = 1.6;
alpha = 0;
}



function end_screen_transition
{

the_end_screen.visible = on;
the_end_screen.transparent = on;
the_end_screen.alpha = 0;

while(the_end_screen.alpha < 100)
{
the_end_screen.alpha += 2 * time;
wait(1);
}

the_end_screen.transparent = off;

}




but nothing happens. The screen shows up, but it doesn't fade in or anything. It just pops up there normally.

Re: Screen transitions [Re: Knuckles] #158723
10/05/07 02:09
10/05/07 02:09
Joined: Jul 2006
Posts: 91
Florida, USA
Knuckles Offline OP
Junior Member
Knuckles  Offline OP
Junior Member

Joined: Jul 2006
Posts: 91
Florida, USA
Aha, nevermind. I see what happened... I just needed to delete the '* time' part... I guess it was going too fast with the 'time' there.


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