animated menu panel...

Posted By: Blink

animated menu panel... - 03/28/10 20:26

ok, i got this from AUM 17, so i can guess its A5. i have been trying to make it A6, but I am lost, nothing works at all. can someone look at it to see whats wrong? I am trying to add an animated menu panel for my project, and i am having issues.

Code:
/////////////////////////////////////////////////////////////////////////////////////////

bmap panel_pcx = <panel.pcx>;

/////////////////////////////////////////////////////////////////////////////////////////

panel energy_pan // background panel
{
	bmap = panel_pcx;
	layer = 20;	
	pos_x = 0;
	pos_y = 0;
	flags = d3d, overlay, refresh, visible;
}

entity energy_sprite 
{ 
	type = <energy+10.pcx>; 
	layer = 25; 
	view = camera; 
	x = 350; 
	y = 134; 
	z = 124; 
	flags = visible, flare, bright;
} 

function init_animsprite() 
{ 
	while (1) 
	{ 
		energy_sprite.frame += 0.3 * time_step; 
		if (energy_sprite.frame > 10) 
		{
			energy_sprite.frame %= 10; // loop
		}
		wait (1); 
	} 
}


Posted By: Blink

Re: animated menu panel... - 03/28/10 20:29

if anyone else has any other ideas, i am open. truthfully, I wanted a menu with a looping avi movie playing in the bachground, but i couldnt figure it out, so i am settling for this. Help please,lol!
Posted By: badapple

Re: animated menu panel... - 03/29/10 02:30

try changing this

if (energy_sprite.frame > 10)
{
energy_sprite.frame %= 10; // loop
}
to this

if (energy_sprite.frame > 10)
{
energy_sprite.frame =0; // loop
}
Posted By: MTD

Re: animated menu panel... - 03/29/10 08:25

Do You see the energy_sprite at the start?
If You see the energy_sprite - have you called the function init_animsprite() so that the sprite could animate?


If somebody needs Lite-C code, here it is.
(Tested and worked) whistle
The only thing that was missing FLAG2 = VISIBLE wink

Click to reveal..
Code:
BMAP* panel_pcx = "panel.pcx";

PANEL* energy_pan = // background panel
{
	bmap = panel_pcx;
	layer = 20;	
	pos_x = 0;
	pos_y = 0;
	flags = D3D | OVERLAY | VISIBLE;
}

ENTITY* energy_sprite =
{ 
	type = "energy+10.pcx"; 
	layer = 25; 
	view = camera; 
	x = 350; 
	y = 134; 
	z = 100; 
	flags = BRIGHT | TRANSLUCENT;
	flags2 = VISIBLE;
} 

function init_animsprite() 
{ 
	while (1) 
	{ 
		energy_sprite.frame += 0.5 * time_step; 
		if (energy_sprite.frame > 10) 
		{
			energy_sprite.frame %= 10; // loop
		}
		wait (1); 
	} 
}



Posted By: Blink

Re: animated menu panel... - 03/29/10 22:38

thanks badapple, it works,m but now I am stuck again. I tried adding my own bmp in there but it gave me an error, saying it didnt recognize my pcx file.

update, i figured it out, i forgot to save the file in photoshop, so the script didnt recognize it. now if i can resize it and place it where i want it, i will be done.
Posted By: Blink

Re: animated menu panel... - 03/30/10 10:37

ok, new problem. now that i resized the bmp for the animated logo, it is behind the masin panel instead of infront of it. which pos do i adjust? z maybe? i have been trying but nothing is working.
update, figured it out. i changed the layer and the bmp is now in front.
Posted By: TerraSame

Re: animated menu panel... - 04/14/10 17:42

I understand the effort that you have into your menu but have you ever checked out the "Super Menu" that is available on the Acknex Unlimited page under "WDL". It is very well done and easy to install and work with...
Posted By: Blink

Re: animated menu panel... - 04/14/10 18:48

i have that code. not really what i wanted, and some of it is in A5, so i didnt want to convert.
© 2024 lite-C Forums