Stupid question im sure
by Daniel Brown · in Torque Game Engine · 06/14/2004 (10:07 am) · 4 replies
Hey all,
I was playin around with starter.fps today tryin to get some ai to work, but how do i add another ai object? i cant find the object/shape which i have to add where u can specify datablock and name etc?
thanks for any help sorry if it doesnt make any sense
I was playin around with starter.fps today tryin to get some ai to work, but how do i add another ai object? i cant find the object/shape which i have to add where u can specify datablock and name etc?
thanks for any help sorry if it doesnt make any sense
About the author
#3
It will spawn a bot on the path, probably at the same place that the other one. So You'll end up with two bots coliding with each other.
As I discovered by myself, spawning other bots require some understanding of how the AIplayer.cs file works. My suggestion would be rewriting the spawnOnPath function so it spawns both bots in different places.
06/14/2004 (5:50 pm)
Be carefull with AiManager::spawn();It will spawn a bot on the path, probably at the same place that the other one. So You'll end up with two bots coliding with each other.
As I discovered by myself, spawning other bots require some understanding of how the AIplayer.cs file works. My suggestion would be rewriting the spawnOnPath function so it spawns both bots in different places.
#4
06/15/2004 (5:08 am)
Cool! Thanks guys.
Torque Owner Fenrir Wolf
All you should have to do is call the AIPlayer's class SpawnPlayer property. For example:
%anewbot = AIPlayer::Spawn("Botname", "Spawnpointname") ;
Go look in AIPlayer.cs for the Spawn code. It will show you exactly how to to create a new AIPlayer instance.