Game Development Community

"AIPlayer::spawnPlayer()" doesnt works for vehicles ?

by Mathieu · in Technical Issues · 11/18/2002 (3:51 pm) · 3 replies

Hi all,

The "AIPlayer::spawnPlayer()" function works perfectly with the classic player but not with vehicles.
In fact, "new AIPlayer()" returns 0 if the datablock is a vehicle datablock.

Is there any 'scripting' solution ?
I hope i dont have to rewrite the AI code for vehicle :)

THx !

#1
11/18/2002 (3:56 pm)
The AIPlayer is derived from the class Player I think, so its no wonder it wont spawn a vehicle.

If you want AIVehicle you'll have to write it.

Phil.
#2
11/18/2002 (4:07 pm)
thank you ... bad news for me :)
#3
04/21/2003 (12:00 am)
Not Bad News Dude..

All u have to do is change the inheritance of AIPlayer.. and in spawnplayer.. (in script) change it from lightaromorguy.. or something like that.. to hovervehicle.. or car..

very easy.. its getting its ai to work... thats the biotch,!!!