Hello Bisasam,
After some testing - it seems to me like these AI functions EV_PROCESSINFOS, EV_USEMOB wont 'move' as long as oCNpc.interactMob <> 0. If I set this value forcibly to 0 then all events in AI queue go through:
Code:
var oCNpc slf; slf = Hlp_GetNPC (self);
var int mobPtr; mobPtr = slf.interactMob;
slf.interactMob = 0;
[Bild: GM-AI-Queue-Interract-Mob.png]
I tried some methods which (based on their names) could end interaction with mob and found only one that helped - oCMobInter_SendStateChange if you call it before AI_StopProcessInfos then everything seems to work fine (AI_UseMob can be commented out):
Code:
func void PC_SCHMIEDEN_TEST_Info(){
var oCNpc slf; slf = Hlp_GetNPC (self);
var int mobPtr; mobPtr = slf.interactMob;
oCMobInter_SendStateChange (mobPtr, 1, 0);
AI_StopProcessInfos (self);
self.aivar[AIV_INVINCIBLE]=FALSE;
Player_MobsiProduktion=0;
//AI_UseMob(self,"BSANVIL",-1);
};
Try it out, maybe it will help:
Code:
func void oCMobInter_SendStateChange (var int mobPtr, var int fromState, var int toState){
//0067D8C0 .text Debug data ?SendStateChange@oCMobInter@@IAEXHH@Z
const int oCMobInter__SendStateChange_G1 = 6805696;
//0x0071ED90 public: void __thiscall oCMobInter::SendStateChange(int,int)
const int oCMobInter__SendStateChange_G2 = 7466384;
if (!mobPtr) { return; };
CALL_IntParam (toState);
CALL_IntParam (fromState);
CALL__thiscall (mobPtr, MEMINT_SwitchG1G2 (oCMobInter__SendStateChange_G1, oCMobInter__SendStateChange_G2));
};