Tagged: Friend follows and attacks enemy
|July 13, 2012 at 3:56 am #2597|
How Can I make my character friend not only follow me around, but attach enemies as well?
|July 13, 2012 at 7:38 pm #2600|
Ok so I was able to get a friend to seek and attack me lol but I need him to follow me but attack the enemy…and also for enemies to attack not just me but my friend(s) as well..whats best way to code that AI?
|July 16, 2012 at 7:44 pm #2610|
You’ll need to code a unique subclass of RPGFriend that seeks the player unless an enemy is near. If an enemy is near, then seek and attack it.
Check out the RPGAI subclass. You’ll need to override at least the walk method and maybe the update method too.
|July 24, 2012 at 6:57 am #2638|
Hey Nat so i put this code for a character in the friend code and it works..well the friend attacks me and flees from time to time..lol so how do I edit the self getPlayer to make it attack an enemy? I need to change that getPlayer to something else correct
// attack the player
|July 26, 2012 at 11:37 pm #2651|
You must be logged in to reply to this topic.