Log in

View Full Version : facing its target when rooted


sandy
03-26-2004, 02:29 AM
hello
i was trying to make the mobs to facing their target while they are rooted
I tried this int mobai.cpp in AI_Process


else {
// See if we can summon the mob to us
if (!HateSummon()) {
// TODO: Check here for another person on hate list with close hate value
if (AIautocastspell_timer->Check()) {
#if MobAI_DEBUG_Spells >= 25
cout << "Engaged (pursing) autocast check triggered: " << this->GetName() << endl;
#endif
AICastSpell(target, 90, SpellType_Root | SpellType_Nuke | SpellType_Lifetap | SpellType_Snare);
}
else if (AImovement_timer->Check()) {
if( !IsRooted())
CalculateNewPosition(target->GetX(), target->GetY(), target->GetZ(), GetRunspeed());
else {
FaceTarget(target,true);
if ( IsMoving() ) {
SetRunAnimSpeed(0);
SetMoving(false);
moved=false;
}
}

}
}
}


it works well when the monster is not moving and you root him
but if the monster is moving before you root him
when rooted he continues to perform its running animation
I don't understand why ? anyone can help plz ?

RexChaos
03-26-2004, 03:12 AM
I always thought it was lame that mobs could turn while rooted but PC's couldn't. Of course that may have to do with the fact that I'm partial towards rogues anyway. ;)

samandhi
03-26-2004, 08:51 AM
works well when the monster is not moving and you root him
but if the monster is moving before you root him
when rooted he continues to perform its running animation
I don't understand why ? anyone can help plz ? I am not totally sure of this so bonk me of I am wrong, but wasnt something like that implemented on purpose to make up for not being able to use fear (read in temporary place of), until pathing is implemented?

devn00b
03-27-2004, 05:23 AM
could always force the animation. doanim(0);? cant recall the exact function but somthing like that.

Scorpious2k
03-27-2004, 08:56 AM
Mob::DoAnim(const int animnum, int type, bool ackreq)