Game Development Community

AI Vehicle not appearing

by fiveforty · in Torque Game Engine · 10/19/2005 (10:02 am) · 10 replies

I've been trying to get a AI Vehicle to appear in the racing starter kit but with not much luck

I just want a vehicle (other than the player avatar) to drive around following a path
I've tried both this thread and this thread

I just cant get the bot vehicle to appear, I tried the bot path-finding tutorial at www.codesampler.com/torque.htm and can get that to work in the tutorial.base but am having no luck with either of the other 2 examples in the racing starter kit.

can anyone help??

#1
10/19/2005 (5:15 pm)
Checkout console log, are there errors?
#2
10/20/2005 (2:16 am)
I'm getting the following

starter.racing/server/scripts/bot.cs (8): Unable to instantiate non-conobject class AIWheeledVehicle.
Set::add: Object "0" doesn't exist
starter.racing/server/scripts/bot.cs (11): Unable to instantiate find object: '0' attempting to call function 'setShapeName'
Set::getObject index out of range.
starter.racing/server/scripts/bot.cs (14): Unable to instantiate find object: '-1' attempting to call function 'getTransform'
starter.racing/server/scripts/bot.cs (14): Unable to instantiate find object: '0' attempting to call function 'setTransform'
starter.racing/server/scripts/bot.cs (17): Unable to instantiate find object: '0' attempting to call function 'setMoveSpeed'
starter.racing/server/scripts/bot.cs (18): Unable to instantiate find object: '0' attempting to call function 'setMoveTolerance'
Set::add: Object "0" doesn't exist
Bot id:0

I'm using the bot.cs from here

if you can shed any light onto this for me, I would be highly grateful
#3
10/20/2005 (3:16 am)
Are you sure AIWheeledVehicle is correctly compiled?
#4
10/20/2005 (4:20 am)
As sure as I can be, I'm using Eclipse for the TBE.

is there any way of telling if it has compiled correctly??
I'm new to this so I dont know how to check stuff like this :(
#5
10/20/2005 (6:27 am)
During Compile do you have any errors? I am using VC 6 so I can't help you with eclipse but your complier should report errors if there are any.
#6
10/20/2005 (9:22 am)
From a fresh install of the TGE and I do my first rebuild I get 6 errors and 94 warnings
thats before I've even change any code

4 of these errors are in the winGL.cc file
#include "platform/GLCoreFunc.h"
#include "platform/GLExtFunc.h"
#include "platform/GLUFunc.h"
#include "platformWin32/GLWinFunc.h"

1 in winV2Video.cc
#include "platform/3Dfx.h"

andand the other says
cPrecipitationmodifyStorm * In function 'void

but it doesnt give a file

any suggestions??
#7
10/20/2005 (9:49 am)
starter.racing/server/scripts/bot.cs (8): Unable to instantiate non-conobject class AIWheeledVehicle.

That error above tells you that the AIWheeledVehicle didn't get added to your project. I'm not familiar with TBE at all, but after you get your other issues sorted, you just need to add the AIWheeledVehicle.cc file to your project and make sure it gets linked in.
#8
10/20/2005 (11:01 am)
Yes, 540 Media, you need to edit the makefiles by hand to add it to the compile process.
#9
10/21/2005 (2:08 am)
Ok just to show that I'm a total newb... how do I edit the makefiles by hand then add it to the compile process??

which makefiles? and then how do I add them??

sorry for asking what will probably be a real basic question, but I've only been doing this for like 5 days
and dont have any C/C++ experience.... you dont get these problems with lingo/actionscript!!! :D
#10
10/21/2005 (5:25 am)
Ok I'm not as stupid as I look, others might disagree... but I digress
I figure out the whole makefile thing

you were both right (brian and chris) the AIWheeledVehicle.cc was not being linked
just had to edit the makefile and it works like a charm!

thanks so much guys