Game Development Community

Adding Custom enemy chararacter to TGE

by Arthur D. Burson · in Game Design and Creative Issues · 11/04/2010 (4:33 pm) · 1 replies

I added a custom player to the StarterFPS. In doing so I also replaced the AI that used to be the ORC. Now my player character and IA are the same thing. How do I change this to where the AI character and Player character are different. I am in need of code and also what cs files need to be affected. Thanks in advance.

#1
11/04/2010 (4:45 pm)
What's happening is that the AI datablock (found in aiPlayer.cs), called DemoPlayer, is deriving from the player datablock (found in player.cs) called PlayerBody, thus it inherits all of the fields and properties of the parent unless you override them.

In the datablock of your AI character simply add a shapeFile field and point it to whatever shape you wish to use -- this will make your AI character have a different shape than your player. You can do this for any other field that you wish to be different.

If that doesn't make sense then the alternative is to duplicate your player datablock, rename it, make changes, and tell the ai script to use this new datablock.