in my game code, character data including models n animations r loaded in2 a map data structure when a new map i chosen 2 be played n will be destroyed when the player finishes playing the map (new game map = new character map so everything is loaded again).
////////////////////////////////////////////////////////////////////////////////////
when loading & binding animation:
_WindowFramework->load_model(_characters[charId]->model,charModel[charType].run);
_WindowFramework->load_model(_characters[charId]->model,charModel[charType].jump);
auto_bind(_characters[charId]->model.node(),_characters[charId]->ModelAnimControl, PartGroup::HMF_ok_part_extra | PartGroup::HMF_ok_anim_extra | PartGroup::HMF_ok_wrong_root_name);
when playing animation:
for(map<int,Characters*>::iterator iter=_characters.begin(); iter != _characters.end(); iter++)
{
if (!_characters[iter->first]->Jump)
{
if (//moving on the ground)
{_characters[iter->first]->ModelAnimControl.loop(“Ralph”, false);}
else
{_characters[iter->first]->ModelAnimControl.pose(“Ralph”,
_characters[iter->first]->ModelAnimControl.get_frame());}
}
if (//jumping)
{_characters[iter->first]->ModelAnimControl.play(“Ralph.1”);}
}
///////////////////////////////////////////////////////////////////////////////////
i binded the run and jump animations of ralph to my movement keys using the same method used in the roaming ralph c++ code, but for some strange reason, the animation name seems 2 change after i reload the map a few times n i dun noe why. need some1 2 explain wat exactly went wrong. will be even more helpful 2 also explain how panda assigns animation names.