Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Grant, AndrewAMD), 911 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Fading problem #331729
07/05/10 22:37
07/05/10 22:37
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Code:
PANEL* black_pan = 
{
	bmap = black;
	layer = 100;
	flags |= (TRANSLUCENT);
}
function einfaden()
{
	black_pan.flags |= (SHOW);
	while(black_pan.alpha != 100)
	{
		if(black_pan.alpha == 100) black_pan.flags &= (~SHOW);	
		black_pan.alpha += 5;
		wait(1);
	}
}
function ausfaden()
{
	black_pan.flags |= (SHOW);
	while(black_pan.alpha != 0)
	{
		if(black_pan.alpha == 0) black_pan.flags &= (~SHOW);	
		black_pan.alpha -= 5;
		wait(1);
	}
}



When I start it acknex say that the enigne has to shut down (Windows window that show that acknex has crashed)..WHY? Just simple fade in and fade out, it is a black tga...


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: Fading problem [Re: Liamissimo] #331734
07/05/10 22:54
07/05/10 22:54
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
while(black_pan.alpha != 100)
{
if(black_pan.alpha == 100) black_pan.flags &= (~SHOW);

The code never reach the if() because the loop quits if pan.alpha = 100.
The same in the function ausfaden()
Better use in the if() " >= " or " <= " instead of " == ", vars have always a little inaccuracy...

Last edited by Widi; 07/05/10 22:55.
Re: Fading problem [Re: Widi] #331735
07/05/10 22:59
07/05/10 22:59
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Sorry, can u give me an code example? tried several things based on your idea but I didn't get it. Just too late for my brain


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: Fading problem [Re: Liamissimo] #331737
07/05/10 23:07
07/05/10 23:07
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
function einfaden()
{
black_pan.flags |= (SHOW);
while(black_pan.alpha <= 100)
{
black_pan.alpha += 5;
wait(1);
}
}
function ausfaden()
{
black_pan.flags |= (SHOW);
while(black_pan.alpha >= 0)
{
black_pan.alpha -= 5;
wait(1);
}
}

Doenst work also?


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: Fading problem [Re: Liamissimo] #331739
07/05/10 23:12
07/05/10 23:12
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Code:
void EINBLEND_PANEL(PANEL* my_pan)
{
	set(my_pan,SHOW);
	for (my_pan.alpha = 0; my_pan.alpha < 50; my_pan.alpha += 15 * time_step)   wait (1);
	my_pan.alpha = 50;
}

void AUSBLEND_PANEL(PANEL* my_pan)
{
	for (my_pan.alpha = 50; my_pan.alpha > 0; my_pan.alpha -= 10 * time_step)   wait (1);
	my_pan.alpha = 0;
	reset(my_pan,SHOW);
}


The alpha goes here only to 50 because i use tga.
Call the function like this:

EINBLEND_PANEL(your_panel_name);

Re: Fading problem [Re: Widi] #331741
07/05/10 23:19
07/05/10 23:19
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
It is still crashing...I really dont know why grin Copied everything from you and replaced the functions name to einblend_panel


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: Fading problem [Re: Liamissimo] #331742
07/05/10 23:25
07/05/10 23:25
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Then it is something other not right in your script. I use (copy and paste) this code in my current project.

Re: Fading problem [Re: Widi] #331743
07/05/10 23:34
07/05/10 23:34
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Yes, you were right. SORRY, i am so tired I really forgot my other panel anmed just as my bmao pointer, that caused the error


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011

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