Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,089 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
animating modle added from WED #188231
03/13/08 14:23
03/13/08 14:23
Joined: Dec 2004
Posts: 237
H
Hani Offline OP
Member
Hani  Offline OP
Member
H

Joined: Dec 2004
Posts: 237
hi,
i'm useing the engine SDK.
i have a modle added in WED, it has animation clips . by defult the modle play all its animation clips ,
i want the modle to play a certain animation , this is my code :

Code:
 
ENTITY * MyPlayer;
MyPlayer= ent_for_name("Fighter_mdl_030");
if (MyPlayer)
{
MyPlayer->emask |= DYNAMIC;
}

while (engine_frame())
{
ent_animate(MyPlayer,"Walk",_VAR(10) , ANM_CYCLE);
MyPlayer->pan += _VAR(1);
}



the problem is that the entity don't play the walk animation (its there , and the spilling is right)

now if i created the same model uing the ent_create()

MyPlayer = ent_create(...) insted of MyPlayer = ent_for_name("fighter_mdl_030");
everything work just fine,
so is there any special way to handle entities added in WED regarding animation?

by the way , i've tried it in script , eveything went fine , this proble appear only in higher language


The deference between madness and geniuses is success
Re: animating modle added from WED [Re: Hani] #188232
03/13/08 14:29
03/13/08 14:29
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
ent_animate(MyPlayer,"Walk",_VAR(10) , ANM_CYCLE);

...Well, it certainly doesn't help if you feed the function a fixed value for the frame cycle - "_VAR(10)"

This number is supposed to be a percentage of the cycle


xXxGuitar511
- Programmer
Re: animating modle added from WED [Re: xXxGuitar511] #188233
03/16/08 09:33
03/16/08 09:33
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline
Serious User
LarryLaffer  Offline
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
I'm having the same problem. I'm only using lite-c, but i want to call entities using ent_for_name and not having to assign any actions in WED. It all works fine, but because the engine cycles all animations by default to entities with no actions attached in wed, u can imagine the problem when i try to animate with ent_animate as well. I'll post about this in the Beta section, asking that dynamic entities(my.emask &= ~DYNAMIC;) would not animate by default like this..

Last edited by LarryLaffer; 03/17/08 08:04.

INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: animating modle added from WED [Re: LarryLaffer] #188234
03/16/08 10:18
03/16/08 10:18
Joined: Dec 2004
Posts: 237
H
Hani Offline OP
Member
Hani  Offline OP
Member
H

Joined: Dec 2004
Posts: 237
[xXxDisciple ]
yes it dose, cause that mean "keep the entity animated at that persentage"


The deference between madness and geniuses is success

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