Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/23/26 21:52
WFO Training with parallel cores Zorro64
by Martin_HH. 02/23/26 15:29
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 6,385 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 6 1 2 3 4 5 6
Re: Easy animations [Re: Quad] #326782
06/02/10 20:08
06/02/10 20:08
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I hope too laugh For me it is really hard to use ent_blendframe (I'm using bones for animations)


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Easy animations [Re: 3run] #326821
06/03/10 10:00
06/03/10 10:00
Joined: Aug 2000
Posts: 1,141
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,141
Baunatal, Germany
In fact ent_blendframe is easy to use, but I don't understand what you want to achieve with it. When you're using bones, why don't you use ent_blendpose? This is the function that blends different animations and you only need to copy the example in the lite-C workshop.

Re: Easy animations [Re: Tobias] #326868
06/03/10 13:33
06/03/10 13:33
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
okay:

You need some variables for the animation percentage. Also, you need a string where you save the actual/last animation frame.

So:

Code:
//defines  - lets define something to make it easier (you should do the same in your movement script (easier)
#define STAND 0
#define WALK 1
#define RUN 2
#define DUCK 3
#define JUMP 4
#define SWIM 5
//you can add more here...

//the function
function animate(ENTITY* ent) //we overgive the entity to animate - example: animate(player);
{
//Vars&Strings
var anim_per = 0;
var blend_per = 0;
STRING* anim_name = "#30";  //change the 30 if your animation names are longer
while(1)  //if you don't want it to run the whole time, change the 1 to anything else...
{
//Now you need a var or a skill for you actual player movement
//You must set this var in your movement code
//I will use the player.skill1 for my example here
if(player.skill1 == STAND)
{
 if(str_cmpi(anim_name, "stand") == 1) //if we already blended to the standing animation
 {
  ent_animate(ent, "stand", anim_per, ANM_CYCLE); //animate it in its "stand" animation
  anim_per += 5 * time_step; //change 5 if you want
 }
 else //if we are in another animation, we will blend!
 {
  ent_animate(player, last_anim, anim_per, ANM_ADD); //animate him in his last position with its last animation percentage
  ent_blend("stand", 0, blend_per); //blend it to the first frame of the other animation
  blend_per += 5 * time_step; //change the 30 if needed
  anim_per += 5 * time_step; //still animate in the old anim (change 5 if wanted)
  blend_per = clamp(blend_per, 0, 100); //clamp it between 0 and 100
  if(blend_per == 100) //if the blending is finished
  {
   str_cpy(anim_name, "stand"); //change the actual animation to the stand animation
   anim_per = 0; //and change the animation percentage to 0
  }
 }
}
if(player.skill1 == WALK) 
{
 ... here you do the same as for standing, but change every "stand" to "walk"
}
...and so on
wait(1);
}



you just need to copy/paste the first and change stand to your wanted animation, so you can add many to it!

Re: Easy animations [Re: Rei_Ayanami] #326965
06/03/10 21:23
06/03/10 21:23
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
OK, sounds quit easy for me this way, just few questions: what is last_anim, while compiling it gets error, be cause it is undeclared. And how about non cycling animations, like SHOOT, RELOAD and DRAW. I know how to make them with ent_animate:
Code:
function shoot()
{
        var shoot_percentage = 0;
	while(shoot_percentage < 100)
	{
		ent_animate(my,NULL,0,0); 
		ent_animate(weapon,"shoot",shoot_percentage,ANM_ADD);
		shoot_percentage += 10 * time_step;
		wait (1);
	}
}


How to do the samething with your snippet Rei?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Easy animations [Re: 3run] #326971
06/03/10 21:42
06/03/10 21:42
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
@3run: You have write already by your own or you only takes codesnippet that others write for you?

Use your head, try some ways out...

Re: Easy animations [Re: Widi] #326994
06/03/10 23:32
06/03/10 23:32
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
To my mind the last_anim var needs to be equal to STRING* anim_name. I tried that way, but it doesn't work... thats why I'm asking for help. About non cycling animations, I don't even have any idea frown this stuff is completely new for me... So I need a bit deeper explanation with that.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Easy animations [Re: 3run] #327075
06/04/10 14:02
06/04/10 14:02
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
No, I will NOT explain it again... This was as detailed as i could, and I am tired of it - so many people tried to help you, but if you don't try & error, you won't get to anything -.-

but of course, the last_anim was a typing mistake - just change every last_anim to anim_name

Re: Easy animations [Re: Rei_Ayanami] #327126
06/04/10 18:46
06/04/10 18:46
Joined: Dec 2009
Posts: 3
ua
V
vaio Offline
Guest
vaio  Offline
Guest
V

Joined: Dec 2009
Posts: 3
ua
on bad English)
When the GS appears normal and tech procedural animation?
To be able to easily add a procedural aiming or shooting (up, down, left, right) and mix without problems running, walking, jumping ... etc.
I think the potential of this technology for the GS is huge.

A small example, the video:
http://www.youtube.com/watch?v=l932bUpjfC8

Can someone do this using the methods of animation GS? I think that there is no))

p.s. Here's what to 3Run


Last edited by vaio; 06/04/10 18:47.
Re: Easy animations [Re: vaio] #327128
06/04/10 18:49
06/04/10 18:49
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
So, I rewrote his animation script - i forgot something:

you need to set blend_per to zero in the "normal" animation mode, and copy the actual animation into the string:

Code:
if(str_cmpi(anim_name, "walk") == 1) //if we already blended to the standing animation
			{
				ent_animate(ent, "walk", anim_per, ANM_CYCLE); //animate it in its "stand" animation
				anim_per += 5 * time_step; //change 5 if you want
				str_cpy(anim_name, "walk"); //change the actual animation to the stand animation
				blend_per =0;
			}



Re: Easy animations [Re: Rei_Ayanami] #327147
06/04/10 20:01
06/04/10 20:01
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I'm absolutely agree with you vaio! There needs to be an other, easier way to create such great animations! ent_blend is too complicated! Thats what I'm asking for! For an easy solution! To do not spend weeks on understanding how does ent_blend or whatever works!!! And one more thing Rei, take a look to this video.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Page 4 of 6 1 2 3 4 5 6

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | 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