0 registered members (),
1,094
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Fade-out
#396630
03/08/12 16:59
03/08/12 16:59
|
Joined: Jan 2012
Posts: 16
rcth
OP
Newbie
|
OP
Newbie
Joined: Jan 2012
Posts: 16
|
Hi, I've made a fade-in script, but after the fade-in, it won't fade-out. Script: PANEL* splash = { pos_x = 230; pos_y = 10; bmap = "start1.bmp"; } set(splash, SHOW); wait(1); set(splash,TRANSLUCENT); for (splash.alpha=0; splash.alpha+=5*time_step; splash.alpha<100) wait(5); if(splash.alpha=100) { for (splash.alpha=100; splash.alpha-=5*time_step; splash.alpha>0) wait(5); }
So anyone?
|
|
|
Re: Fade-out
[Re: Superku]
#396634
03/08/12 18:11
03/08/12 18:11
|
Joined: Jan 2012
Posts: 16
rcth
OP
Newbie
|
OP
Newbie
Joined: Jan 2012
Posts: 16
|
|
|
|
Re: Fade-out
[Re: rcth]
#396685
03/09/12 00:44
03/09/12 00:44
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
you could just remove the if statement altogether, you know it must be greater than or equal to 100 after the first for loop. preferably i'd use a while loop
while(splash.alpha < 100){
splash.alpha += 5*time_step; //change this to change the speed
wait(5); //change this to 1 otherwise you'll get uneven fading.
}
wait(-1); //keep onscreen for 1 second
while(splash.alpha > 0){
splash.alpha -= 5*time_step; //as above
wait(5); //as above
}
though the result would be the same
|
|
|
Re: Fade-out
[Re: Superku]
#396729
03/09/12 17:10
03/09/12 17:10
|
Joined: Jan 2012
Posts: 16
rcth
OP
Newbie
|
OP
Newbie
Joined: Jan 2012
Posts: 16
|
Because all the help I get for a really specific type of making games is in the old A7 engine with old physics, that's why. And c-script is another reason.
Last edited by rcth; 03/09/12 17:11.
|
|
|
Re: Fade-out
[Re: rcth]
#396736
03/09/12 19:09
03/09/12 19:09
|
Joined: Oct 2011
Posts: 1,082 Germany
Ch40zzC0d3r
Serious User
|
Serious User
Joined: Oct 2011
Posts: 1,082
Germany
|
These arguments are just shit. You wanna see what you can do with A8 and lite-c? I will post anywhen this year my FPS game for free! I hope you all enjoy it
|
|
|
|