Game Development Community

RPGDialog + Improved AI Guard Unit?

by Marcus Fernstrom · in Torque Game Engine · 04/10/2009 (2:06 pm) · 1 replies

Heh, of course I managed to break things.

My idea was to add both of these resources to have guard NPC's as well as the more talkative version from RPGDialog, but I'm getting errors in the console that I can't figure out how to fix.

So again I'm here spamming the forum asking the more knowledgable(How is that spelled?) developers to enlighten me with their wisdom, or a swift jab to the head and a quick fix, whichever works for you godly coders and scripters. =)

The errors I'm getting are:

Executing starter.fps/data/missions/newMission.mis.
starter.fps/server/scripts/aiPlayer.cs (480): Unable to find object: '' attempting to call function 'getPosition'
starter.fps/server/scripts/aiPlayer.cs (480): Unable to find object: '' attempting to call function 'getTransform'
starter.fps/server/scripts/aiPlayer.cs (480): Unable to find object: '' attempting to call function 'getPosition'
starter.fps/server/scripts/aiPlayer.cs (482): Unable to find object: 'MissionCleanup' attempting to call function 'add'
starter.fps/server/scripts/aiPlayer.cs (496): Unable to find object: '' attempting to call function 'getTransform'

And a bit later on when I tried to manually add a bot using the SpawnTestNPC(); function:

starter.fps/server/scripts/aiPlayer.cs (480): Unable to find object: '' attempting to call function 'getPosition'
starter.fps/server/scripts/aiPlayer.cs (480): Unable to find object: '' attempting to call function 'getTransform'
starter.fps/server/scripts/aiPlayer.cs (480): Unable to find object: '' attempting to call function 'getPosition'
starter.fps/server/scripts/aiPlayer.cs (496): Unable to find object: '' attempting to call function 'getTransform'

I really am sorry for bugging you nice people here but err.. please help out a newbie?

#1
04/10/2009 (2:20 pm)
I think I managed to fix it..
If someone else has tried and failed, here's what I did:
(I should note that I had implemented the RPGDialog before I put in the Improved guard resource)

I loaded up an original version of AIPlayer.cs and looked for anything named AIPlayer:: and changed that to AIPlayer2::

Then I went into the RPGDialog.cs and looked for the function SpawnTestNPC() and changed the reference from %player = AIPlayer::spawn("a test NPC","289.281 -239.883 187.029"); to %player = AIPlayer2::spawn("a test NPC","289.281 -239.883 187.029");

And did the same a few lines down at the normal SpawnNPC function, and it seems to work. I haven't done any real testing yet so I won't vouch for this though it seems to work.

Sorry about the false alarm XD