Frictional Games Forum (read-only)
Monster Disappears when assigned a new Agent class - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html)
+--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html)
+---- Forum: Development (https://www.frictionalgames.com/forum/forum-82.html)
+---- Thread: Monster Disappears when assigned a new Agent class (/thread-44268.html)



Monster Disappears when assigned a new Agent class - A.M Team - 04-13-2016

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?


RE: Monster Disappears when assigned a new Agent class - Abion47 - 04-13-2016

What were the modifications exactly?


RE: Monster Disappears when assigned a new Agent class - A.M Team - 04-13-2016

Sounds. That's it.


RE: Monster Disappears when assigned a new Agent class - Abion47 - 04-13-2016

...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.


RE: Monster Disappears when assigned a new Agent class - A.M Team - 04-13-2016

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.


RE: Monster Disappears when assigned a new Agent class - Abion47 - 04-13-2016

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.