|
2 registered members (AndrewAMD, TipmyPip),
6,052
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Easy animations
[Re: 3run]
#326758
06/02/10 18:44
06/02/10 18:44
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Its official, Im pulling out of this thread.
There is obviously something here I dont understand. Ive done my testing and it does smoothly interpolate between frames OF THE SAME SCENE, when you use fractions of a percent. So if you simply lerp the percentage, then it does what I understand you want. But this is obvious to all, so I no longer know what we are talking about. Ive never done any animated characters before...
NOOB out...
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Easy animations
[Re: EvilSOB]
#326763
06/02/10 19:06
06/02/10 19:06
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
Man that is all be cause of my English  Do not be upset. Here is a two videos, first is with using ent_animate, second is with using ent_blend: FIRST SECOND You can see that with ent_animate changing between animations is weird  But with ent_blend they looks more professional. But there is a huge different between using ent_animate and ent_blend, the first one is much easier and faster to work with.
|
|
|
Re: Easy animations
[Re: 3run]
#326766
06/02/10 19:15
06/02/10 19:15
|
Joined: Feb 2009
Posts: 3,207 Germany, Magdeburg
Rei_Ayanami
Expert
|
Expert
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
|
damn, you need to use them both - be creative! It is really, really simple! Example from one of my games:
if((none == 1) && (jumping == 0) && (falling == 0) && (shooting == 0) && (slide == 0) && (blaster_anm == 0)) //if he stands
{
if(str_cmpi(last_anim, "stand") == 1)
{
ent_animate(player, "stand", stand_per, ANM_CYCLE); //animate the player with the stand animation
stand_per += 5 * time_step; //add 5 * time_step to Stand percent
str_cpy(last_anim, "stand"); //set last frame to stand
}
else
{
ent_animate(player, last_anim, 100, ANM_ADD); //blending
ent_blend("stand", 0, stand_per);
stand_per += 30 * time_step; //add 30 * time_step to stand percent
if(stand_per >= 95) str_cpy(last_anim, "stand"); //set last frame to stand
}
walk_per = 0; //set all others to 0
jump_per = 0;
slide_per = 0;
attack_per = 0;
fall_per = 0;
blend_per = 0;
land_per = 0;
}
|
|
|
Re: Easy animations
[Re: 3run]
#326769
06/02/10 19:24
06/02/10 19:24
|
Joined: Feb 2009
Posts: 3,207 Germany, Magdeburg
Rei_Ayanami
Expert
|
Expert
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
|
haven't you read me post???
It should work with unlimited animations -.- ...
In my code uses 8 at the moment... Just add more vars and change the string...
Last edited by Rei_Ayanami; 06/02/10 19:27.
|
|
|
Re: Easy animations
[Re: 3run]
#326777
06/02/10 19:56
06/02/10 19:56
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
what rei explained is more or less same as the example i given  you see it can be done easily, hope you get the idea after Rei explains it.
Last edited by Quadraxas; 06/02/10 19:57.
3333333333
|
|
|
|