Did you try this line ? Are you aware of what happens to a GameObjectAIScript when _gameobject->Despawn(0,0) is called ?