Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, EternallyCurious, Petra, 1 invisible), 764 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Animated sprites on panels? #456025
11/06/15 07:23
11/06/15 07:23
Joined: Dec 2010
Posts: 224
NRW, Germany
NeoJones Offline OP
Member
NeoJones  Offline OP
Member

Joined: Dec 2010
Posts: 224
NRW, Germany
Hey guys,

I need some animations on panels. So I know that I can define a bmap array and loop thru this array in a while loop to change the panel.bmap.
But anyone knows, if is there an easier way to manage this?

Animated sprites dont work on panels... (Someone correct me if Iam wrong)

Regards, DF

Last edited by Dragonfly; 11/06/15 07:26.

Errors are the engine of progress.

Version: A8 Commercial
OS: Win 7 64bit
Models: Cinema 4D
Re: Animated sprites on panels? [Re: NeoJones] #456063
11/07/15 22:31
11/07/15 22:31

M
Malice
Unregistered
Malice
Unregistered
M



Animated sprites dont work on panels... (Someone correct me if Iam wrong)


I would assume you could create a animated View-Entity sprite, the place it's layer 1 higher then the panel and then place it's pos_x/y to be in the correct screen spot..

As it is a sprite simple changing it's frame by time_step*a_speed should animate it

my.frame +=2*time_step;



Just some ideas to play with

Re: Animated sprites on panels? [Re: ] #456065
11/07/15 23:32
11/07/15 23:32
Joined: Dec 2010
Posts: 224
NRW, Germany
NeoJones Offline OP
Member
NeoJones  Offline OP
Member

Joined: Dec 2010
Posts: 224
NRW, Germany
Thanks Malice. If I understand right, I need for every animation 1 View-Entity and 1 Sprite-Entity + action to change the frames.
At the moment I dont know, if this needs more lines of code as my current solution with a BMAP* array...

I searched for swf plugin, too. This would be exactly what I need, but I found only dead links.

Last edited by NeoJones; 11/07/15 23:32.

Errors are the engine of progress.

Version: A8 Commercial
OS: Win 7 64bit
Models: Cinema 4D
Re: Animated sprites on panels? [Re: NeoJones] #456066
11/08/15 03:20
11/08/15 03:20

M
Malice
Unregistered
Malice
Unregistered
M



Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////
BMAP* city_bmp = "city.tga";
PANEL* my_panel =
{
	pos_x = 100;
	pos_y = 50;
    bmap = city_bmp;

	flags = SHOW;
}
function animate_screen()
{
	ENTITY* amn_sprite=	ent_createlayer("explo+13.tga",0,10);
	var for_anm=0;
	while(1)
	{
	amn_sprite.x=200;	
	amn_sprite.frame+=time_step;
	amn_sprite.frame%=13; // from file name
		wait(1);
	}
}
function main()
{
video_mode =9;
animate_screen();
}



Play this this..

If needed I can include links to image city. explo+13 found in template folder.
amn_sprite.x = closer/farther bigger/smaller
amn_sprite.y = left/right screen
amn_sprite.z = up/down screen

http://www.conitec.net/beta/flags.htm
flags can be set by amn_sprtite.flags2 |= SHOW; &=~SHOW;

Ignoring the anm_panel and instead creating amn view entities may be better. Also there are other ways I will have to play around with to know, such as, it is possible to create a whole 3d cut scene in a unviewed level area then render it to a on screen VIEW* or into a onscreen panel->bmap


Last edited by Malice; 11/08/15 03:32.
Re: Animated sprites on panels? [Re: ] #456067
11/08/15 07:36
11/08/15 07:36
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
A window on a panel could be a solution too.

Code:
BMAP *bmpSprite = "explo+7.pcx";
var nSpriteFrame = 0;
PANEL *panSprite =
{
   window ( 0, 0, 180, 180, bmpSprite, nSpriteFrame, NULL );
}



Salud!

Re: Animated sprites on panels? [Re: txesmi] #456069
11/08/15 08:50
11/08/15 08:50
Joined: Dec 2010
Posts: 224
NRW, Germany
NeoJones Offline OP
Member
NeoJones  Offline OP
Member

Joined: Dec 2010
Posts: 224
NRW, Germany
Thanks guys! Yes it works, Malice laugh


Errors are the engine of progress.

Version: A8 Commercial
OS: Win 7 64bit
Models: Cinema 4D

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