- Home /
Question by
LeftyTwoGuns · Aug 17, 2014 at 04:17 AM ·
aiinheritance
Inheritance the best way to modify AI functions?
Say I have a single script for AI behavior for all enemies, that contains functions like
void Patrol(){
blah blah
}
void Shooting(){
blah blah
}
But I'd like specific individual enemies to do additional things. Like have an enemy do the patrol, then go sit down somewhere for a bit, then go back on control. Or even just sit down indefinitely and not patrol at all, would creating a new script just for that behavior that Inherits the AI class be the best way to do this?
Comment
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
NPCs follow player in a line 1 Answer
Coordinating multiple AI enemies 3 Answers
How to make basic AI in a 2d game? 4 Answers
Unity 3D Audio Clip Disabled 1 Answer