Apparently my character wont animate when i try to do it using the AIGetEntityAction command in DGDK.
char *action = AIGetEntityAction( obj );
if (DEBUG_ALL)
{
if (dbObjectVisible(obj))
{
dbInk( dbRgb(0,0,0), 0 );
dbCenterText( dbObjectScreenX(obj)+1, dbObjectScreenY(obj)+1, action);
dbInk( dbRgb(255,255,255), 0 );
dbCenterText( dbObjectScreenX(obj), dbObjectScreenY(obj), action);
}
}
if (action == "Moving Forwards")
{
this->SetAnimation( NULL, NULL, ZOMBIE_ANIM_WALK_START, ZOMBIE_ANIM_WALK_END, false );
}
if (action == "Stopped")
{
this->SetAnimation( NULL, NULL, ZOMBIE_ANIM_IDLE_START, ZOMBIE_ANIM_IDLE_END, false );
}
if (action == "Stopped And Attacking")
{
this->SetAnimation( NULL, NULL, ZOMBIE_ANIM_ATTACK_START, ZOMBIE_ANIM_ATTACK_END, false );
}
if (action == "Moving Forward And Attacking")
{
this->SetAnimation( NULL, NULL, ZOMBIE_ANIM_WALK_START, ZOMBIE_ANIM_WALK_END, false );
}
this->Animate( );
Know why?
Lucy in the
Sky with
Diamonds