Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Fadeing image #173439
12/17/07 21:49
12/17/07 21:49
Joined: Jun 2007
Posts: 63
Italy
Sonic220 Offline OP
Junior Member
Sonic220  Offline OP
Junior Member

Joined: Jun 2007
Posts: 63
Italy
I would like to create a fadeing effect in my game.
Something like: Gamestudio image >>> fade to black >>> My image >>> fade to black >> title screen

And I can do this at the start of a level?
Title >> fade >> level1

Another question: how to fade the audio at the end of the level?

Sorry for my bad english, i dunno if i've explaned myself


~Vision Divine~
Re: Fadeing image [Re: Sonic220] #173440
12/17/07 22:05
12/17/07 22:05
Joined: Jul 2006
Posts: 503
Australia
A
adoado Offline

User
adoado  Offline

User
A

Joined: Jul 2006
Posts: 503
Australia
For fading audio, I am not sure, I have never done it. Maybe just create a while() loop and slowly lower the volume?

For fading an image to black. I think you just create one panel with a black bmap and another on top of it (the one which you will later fade). Then you simply lower the alpha value of the panel on top to slowly reveal the panel on the bottom. Not tested though ^^

Thanks,
Adoado


Visit our development blog: http://yellloh.com
Re: Fadeing image [Re: adoado] #173441
12/17/07 22:21
12/17/07 22:21
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Happy Birthday Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
here a little snippet, see what you can do with it(and look at the layer-properties)

while(splash.alpha>0)
{
splash.alpha-=5*time_step;
wait(1);
}

for sound look at the snd_tune instruction

Re: Fadeing image [Re: Scorpion] #173442
12/19/07 09:10
12/19/07 09:10
Joined: Jun 2007
Posts: 63
Italy
Sonic220 Offline OP
Junior Member
Sonic220  Offline OP
Junior Member

Joined: Jun 2007
Posts: 63
Italy
With sound I've done this, but it doesn't work
var volume1 = 50;
media_play ("track1.wav", null, volume1);
volume1-=10*time;


~Vision Divine~
Re: Fadeing image [Re: Sonic220] #173443
12/19/07 09:49
12/19/07 09:49
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline

User
TSG_Torsten  Offline

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
You have to use this in a while-loop.

You have to save the handle of the media_play instruction
(mhandle=media_play(...);
then use a variable for the volume and lower them every loop a little bit
(volume-=2*time_step;).
Than you use media_tune each loop and "manipulate" the volume of the playing sound.
(media_tune(mhandle,...);


Regards
TSGames


Gamestudio download | 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