2 registered members (Akow, tomaslolo),
1,536
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Animated sprites on panels?
#456025
11/06/15 07:23
11/06/15 07:23
|
Joined: Dec 2010
Posts: 224 NRW, Germany
NeoJones
OP
Member
|
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
|
Malice
Unregistered
|
Malice
Unregistered
|
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
OP
Member
|
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
|
Malice
Unregistered
|
Malice
Unregistered
|
///////////////////////////////
#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.htmflags 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
Serious User
|
Serious User
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
|
A window on a panel could be a solution too.
BMAP *bmpSprite = "explo+7.pcx";
var nSpriteFrame = 0;
PANEL *panSprite =
{
window ( 0, 0, 180, 180, bmpSprite, nSpriteFrame, NULL );
}
Salud!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|