ghreef
Member
|
animation tutorial question
Can anyone explain where in this statement it explicitly sets the .anim file to the walk animation?
cskel.clear().animate(L"../data/anim/walk.anim", Time.time()); // set default walking animation
I understand clearing the cksel, then setting an animation to it, and I understand that the "../data/anim/walk.anim" is the path to the actual animation, but what makes this apply to the walking animation and say - not the running animation? Is that the "L"????
|
|
08-26-2011 12:01 AM |
|
Dandruff
Member
|
RE: animation tutorial question
|
|
08-26-2011 12:55 AM |
|
ghreef
Member
|
RE: animation tutorial question
That's not really my question Dandruff. Unless I get this all wrong...
Something needs to tell the engine that we want to set walk.anim to the walking action in the game. Then we might set a swim.anim to the swimming function, and run.anim for running. Then somewhere else in the code we say (essentially) 'make the character walk, and that moves the character somehow and turns on the walk.anim.
My challenge is that we are not explicitly setting the walk.anim to "walk" anywhere.
For instance: in the ERPG2 character.h file I found in a comment that:
walk=cskel.getSkelAnim("custom walk.anim")
will change the .anim file tied to the *walk pointer in the struct SkelAnimCache.
but I don't see
cskel.clear().animate(L"../data/anim/walk.anim", Time.time());
setting to any "walk" pointer.
|
|
08-26-2011 01:05 AM |
|
Esenthel
Administrator
|
RE: animation tutorial question
basic animations are done in Game::Chr class methods.
Source code for Game::Chr is available in company+ license.
inside those methods you have things like:
..
sac.walk =&cskel.getSkelAnim("anim/walk.anim");
..
and:
..
cskel.animate(sac.walk , anim.time , b_walk_f)
..
|
|
08-28-2011 11:48 AM |
|