Advanced 3DGPAI1 - Making Chap. 7 More Complicated :P
by Chris Oconnell · in Torque Game Engine · 02/23/2006 (9:01 pm) · 2 replies
I am trying to utilize many multiple AI chaser guards in a project, but I don't want them all to look alike.
Can anyone tell me how I would go about modifying aiGuard.cs to load a random model from any number of 3 or 4 dts characters?
...or if easier, how to load random skins onto one dts guy?
...Thanks ahead.
Can anyone tell me how I would go about modifying aiGuard.cs to load a random model from any number of 3 or 4 dts characters?
...or if easier, how to load random skins onto one dts guy?
...Thanks ahead.
About the author
#2
Thanks for trying, though.
03/03/2006 (2:14 pm)
Well... there's no onAdd function anywhere in AiGuard.cs. I tried putting it in different parts of the spawn and playerdata datablocks, but no luck. Thanks for trying, though.
Torque Owner Kirchgessner
Prosimian Productions
(Bear with me I'm working from thought alone no code in front of me)
............Under the onAdd function
%obj.setskinname(%randomskins);
switch$(%randomskins)
{
case "blue":
%randomskins = "~/data/Shapes/Player/BlueTexture";
case "Green":
%randomskins = "~/data/Shapes/Player/GreenTexture";
case "Grey":
%randomskins = "~/data/Shapes/Player/GreyTexture";
default:
%randomskins = "~/data/Shapes/Player/DefaultTexture";
}
Something like that should work I think.