PDA

View Full Version : AI help needed with Angels


GMan
18.04.2007, 22:12
I just started noticing this error in the last few days

/18/2007 13:54:xx.xx6, [.\NPC.cpp][5067] CNPC::GetIndexFromCreature failed. spCreature=NULL
04/18/2007 13:54:xx.xx6, --- script call context ---
04/18/2007 13:54:xx.xx6, [0] messenger_angel [MY_DYING][3997][-1]
04/18/2007 13:54:xx.xx6, [1] warrior_casting_3skill_approach_revival [MY_DYING][69][11]

I looked at the AI and cant make sense of it, and i cant find what the CreateOnePrivateEx syntax is so I'm not sure whats supposed to be there. nor do i have any idea what myself.c_ai0 has as a value. Anyone wanna help me? ;)

anyway heres the line from warrior_casting_3skill_approach_revival thatseems to be causing all the issues

EventHandler MY_DYING()
{
myself->CreateOnePrivateEx(silhouette,ai_type,0,0,myself->FloatToInt(myself.sm.x),myself->FloatToInt(myself.sm.y),myself->FloatToInt(myself.sm.z),0,1000,myself->GetIndexFromCreature(myself.c_ai0),0);
}

HF
19.04.2007, 06:46
EventHandler ATTACKED(attacker,damage)
{
super;
if( myself->IsNullCreature(myself.top_desire_target) == 0 )
{
if( myself.top_desire_target.is_pc == 1 ) <-- remove this check
{
myself.c_ai0 = myself.top_desire_target;
}
}
}

GMan
19.04.2007, 07:31
interesting, trying now