6 registered members (AndrewAMD, Ayumi, degenerate_762, 7th_zorro, VoroneTZ, HoopyDerFrood),
1,268
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Questions on bone animation
[Re: lemming]
#407408
09/12/12 14:08
09/12/12 14:08
|
Joined: Jan 2010
Posts: 145
Doc_Savage
Member
|
Member
Joined: Jan 2010
Posts: 145
|
hey there, im not the best at gamestudio, but im certanly not the worst. did you try checking your game code to see how many functions are runing at the same time? too many running at the same time can cause hanging, hit f11 in game to see a list of everything, "fnc" should be the number of functions. also ive heard a good way to animate weapons/armor, etc with models is to animate it WITH the model, as in put your armor on your guy, animate him, then sae your armor as a separate model. im a bit unsure as to the details of this strategy, but perhaps someone else could put a word in? i hope i was able to help
Do not concern yourself with my race, personality or origin. find my record in the pits, and then make your wager.
|
|
|
Re: Questions on bone animation
[Re: tunisod]
#412341
11/26/12 07:40
11/26/12 07:40
|
Joined: Jul 2008
Posts: 2,107 Germany
rayp
X
|
X
Joined: Jul 2008
Posts: 2,107
Germany
|
can you give me a quick example on how you used ent_animatefrom?
ENTITY* anmsource;
action AnmSource_Model() //apply to model with animations
{
anmsource = me;
}
action Model_NoAnims()
{
while(!anmsource) wait(1);
while(1)
{
my.skill1 += time_step;
ent_animatefrom(me, anmsource, "idle", my.skill1, ANM_CYCLE)
wait(1);
}
}
Like ent_animate, but loads the bones animation from a separate entity. This way entities can share bones animation scenes. Edit: @lemming Did u set the passable flag of the attached "bodyparts" ? Might save some frames... greets
Last edited by rayp; 11/26/12 08:03.
Acknex umgibt uns...zwischen Dir, mir, dem Stein dort... "Hey Griswold ... where u gonna put a tree that big ?" 1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected rayp.flags |= UNTOUCHABLE;
|
|
|
Re: Questions on bone animation
[Re: tunisod]
#412402
11/26/12 22:22
11/26/12 22:22
|
Joined: Nov 2011
Posts: 274 de
lemming
OP
Member
|
OP
Member
Joined: Nov 2011
Posts: 274
de
|
rayp was faster, but if you're still interested in my code:
void pl_Animate(ENTITY* chara, STRING* scene, var percent, var mode)
{
ENTITY* piece;
if (chara != NULL)
{
ent_animate(chara, scene, percent, mode);
if (chara.phair != NULL)
{
piece = (ENTITY*)chara.phair;
ent_animatefrom(piece, chara, scene, percent, mode);
vec_set(piece.x, chara.x);
vec_set(piece.pan, chara.pan);
}
if (chara.pchest != NULL)
{
piece = (ENTITY*)chara.pchest;
ent_animatefrom(piece, chara, scene, percent, mode);
vec_set(piece.x, chara.x);
vec_set(piece.pan, chara.pan);
}
// and so on
}
}
phair and pchest are skills I use to store pointers. The codeblocks repeat for all armor/clothing/whatever pieces.
|
|
|
|