Game Development Community

Placing AI mobs in map

by Benjamin Birney · in Torque Game Engine · 03/29/2005 (7:36 am) · 3 replies

I'm having a little trouble figuring out how to actually attach an AI script to a shape that bops around in the game. I've got a script that I think will work (after I debug it), but I'm at a loss as to how to place it into the game. All the things I see in the World Editor Creator are just gear, static shapes and whatnot - where do you actually place an AI mob?

Are there any places you need to reference it in code aside from its whatever.cs in starter.fps/server/scripts? I've noticed that my .cs script isn't getting turned into a .dso when Torque launches... so I suspect there's someplace I need to tell it to load up that script, I just don't know where it is, and can't find it in the documentation anywhere...

Any help would be greatly appreciate. Thanks!

Ben

#1
03/29/2005 (7:53 am)
An addendum: I also added this line to /starter.fps/server/scripts/game.cs

exec("./aiscientist.cs");

(aiscientist.cs is the name of my new script)

...but it still didn't get turned into a .dso at runtime, though other scripts in that folder were.

After looking at some sample code I realized that I need to place the AIMarker object in the map, which will be turned into my little guy once the map is loaded. So I just need to get Torque to actually look at my script now.
#2
03/29/2005 (8:04 am)
Upon closer examination, I discovered that the console was in fact bawling about a syntax error in my script, but I didn't see notification of it in the main window. So it was never loaded, and I couldn't place it the AIMarker.

Ding, I win a cookie.
#3
03/29/2005 (10:20 am)
There was a recent resource about adding custom objects to the World Editor. That'll show you how to add AI players to the build menus.