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
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 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
animating sprites? #294669
10/20/09 14:18
10/20/09 14:18
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
now, the manual states:

For an animated sprite ...... place the single animation frames beneath each other in the image, as in a horizontal film strip. Give then the number of frames after a '+' at the end of the file name, example:
explo+11.tga

so i have to put each frame into an image file, so 11 frames in one image, this is rather repetitive to do however! copy pasting, resizing...

i downloaded a resource and in it i saw that each frame was a seperate image file, like:
+0snail.tga
+1snail.tga
+2snail.tga

can it be done like that? how would i go about animating that if it can be done

-dark-

Re: animating sprites? [Re: darkinferno] #294672
10/20/09 14:50
10/20/09 14:50
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
ent_animate(Entity, "", var, mode);

The "" leave blank.

example:

Code:
ent_animate(my, "", my.skill1, ANM_CYCLE);
my.skill1 += 3*time_step;




You can do it with single Imagesfiles too.
But that needs a bit more coding.

Code:
STRING* filename = "Filename+";
STRING* varname = "";

[...]

while(...)
{
    str_for_num(varname, my.skill1);
    str_cat(filename, varname);
    str_cat(filename, ".tga");
    ent_morph(my, filename);
    my.skill1 ++;
    if(my.skill1 == maxcount)
    {
        my.skill1 = 0;
    }
    str_cpy(filename, "Filename+");
...
wait(1);
}



Last edited by Espér; 10/20/09 15:04.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<

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