Frictional Games Forum (read-only)

Full Version: Monster Disappears when assigned a new Agent class
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I've recently found a bug that makes the entity disappear when given a different agent class. This class being a modified copy of the Infected_robot hps file. Put in my mod the way it is supposed to it shows in the HPL log of my mod this:

ERROR: Could not find class 'agent_saul' in module 'agent_saul.hps'. Error code: 'INVALID_TYPE'
ERROR: Could not create Agent 'servant_saul_1' of type 'Agent_Infected_Robot' because script was not loaded!

Any suggestions?
What were the modifications exactly?
Sounds. That's it.
...Could you be more specific? A lot of this stuff still falls under the category of it could be any one of a huge number of things.
const tString gsInfectedRobotSpotPlayerSound="monsters/saul/alert";
const tString gsInfectedRobotHearsSomething="monsters/saul/alert";
const tString gsInfectedRobotInvestigateOver="monsters/saul/idle";
const tString gsInfectedRobotGotAgressive="monsters/saul/hunt";

const tString gsInfectedRobotIdleSound = "monsters/saul/idle";
const cVector2f gfInfectedRobotIdleSoundMinMax = cVector2f(1, 10);

const tString gsInfectedRobotSearchSound = "monsters/saul/alert";
const cVector2f gfInfectedRobotSearchSoundMinMax = cVector2f(1, 10);

const tString gsInfectedRobotHuntSound = "monsters/saul/hunt";
const cVector2f gfInfectedRobotHuntSoundMinMax = cVector2f(1, 10);

That is it.
There must have been other things you've changed. The name of the agent class, for one, unless it's still called "cScrAgentInfectedRobot".

Well, the fact that it's not complaining about line numbers and such means it's probably not directly related to the code itself. It's odd that it's complaining about a module, though, since as far as I'm aware the AI classes aren't modules. If that's the case, though, then there's probably somewhere that you have to register your agent class in order for the game to recognize it.