Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
3 registered members (7th_zorro, AndrewAMD, Ayumi), 750 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
animated menu panel... #317057
03/28/10 20:26
03/28/10 20:26
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
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); 
	} 
}




My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: animated menu panel... [Re: Blink] #317058
03/28/10 20:29
03/28/10 20:29
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
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!

Last edited by Blink; 03/28/10 20:29.

My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: animated menu panel... [Re: Blink] #317065
03/29/10 02:30
03/29/10 02:30
Joined: Apr 2006
Posts: 624
DEEP 13
badapple Offline
User
badapple  Offline
User

Joined: Apr 2006
Posts: 624
DEEP 13
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
}

Re: animated menu panel... [Re: badapple] #317084
03/29/10 08:25
03/29/10 08:25
Joined: May 2006
Posts: 148
Latvia
MTD Offline
Member
MTD  Offline
Member

Joined: May 2006
Posts: 148
Latvia
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); 
	} 
}




Re: animated menu panel... [Re: MTD] #317202
03/29/10 22:38
03/29/10 22:38
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
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.

Last edited by Blink; 03/29/10 22:43.

My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: animated menu panel... [Re: Blink] #317242
03/30/10 10:37
03/30/10 10:37
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
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.

Last edited by Blink; 03/30/10 10:51.

My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: animated menu panel... [Re: Blink] #319388
04/14/10 17:42
04/14/10 17:42
Joined: May 2009
Posts: 439
T
TerraSame Offline
Senior Member
TerraSame  Offline
Senior Member
T

Joined: May 2009
Posts: 439
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...

Re: animated menu panel... [Re: TerraSame] #319403
04/14/10 18:48
04/14/10 18:48
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
i have that code. not really what i wanted, and some of it is in A5, so i didnt want to convert.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."

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