Game Development Community

Insert AI problem

by Bjarke Skjolstrup · in Torque Game Engine · 11/03/2008 (11:12 pm) · 4 replies

Hi Experts.

I have now used hours and hours to get this to work, but i just can't figuere out what is wrong, so i hope you guys can help med.

I want to get a AI player into my game.
I have based it on http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3746
which i have followed step by step, and even tried to download the examples, but that didnt work either.
This is what i get when i press Ctrl-B (This is det closed thing to a result i have got, have got a lot of weird errors before i got this far)

Mapping string: AddBot to index: 3
Set::add: Object "" doesn't exist
Bjarke/server/scripts/commands.cs (70): Unable to find function AIPlayer::spawnPlayer
Set::add: Object "" doesn't exist
Bjarke/server/scripts/commands.cs (73): Unable to find object: '' attempting to call function 'setAttackTargetObject'

Hope that you can and will help me.

Best Regards
Bjarke

#1
11/04/2008 (12:28 am)
Hej Bjarke

Working with an old one from Beffy, eh. Well...

Quote:
If you haven't done so already, add aiPlayer.* to your project and compile...

At first glance it seems from the errors that you dident add the aiPlayer files to the 'project'. You might allready have placed them there, but did you link them in so they are compiled alongside the rest of the project ?

PS: rart at se en Dansker mere herinde ;)
#2
11/04/2008 (9:30 am)
Hi Christian

I think i have, but i'm pretty new as an C/C++ user, so i actually don't know.

The old one, i know, but i cant fint any newer tutorial :( (If you know any, please tell me)
In gennerlly all tutorials are many years old :-/

Bjarke

Ps. Ja det er rart at moede en landsfaelle saadanne steder :)
#3
11/04/2008 (1:00 pm)
Well, i found a newe one, from this year, i think i try to go with that :)

But thanks for your help

Mvh
Bjarke

Power to the danes :P
#4
11/26/2008 (4:34 pm)
Hmm... are you executing aiplayer.cs in game.cs?

Make sure you have something like this.

exec("./player.cs");
exec("./aiPlayer.cs");



AIPlayer::spawnPlayer function is located in aiplayer.cs.

starter.fps/server/scripts/aiplayer.cs


Btw, I would use the aiplayer.cs file that came with your SDK. Don't use the one in the resource.

And remember to delete all the dso files after you make a change to the scripts.