Forcing bots to follow a player?



  • Simple as that. Is it possible somehow for a bot, that is on the same team as a specific player, to follow that player around instead of following pathnodes?

    It’s for a custom map. I was hoping there was some kind of easy AI package/node to be found in Kismet, but so far no luck.



  • can you force them to follow some sort of moving object you can then attach to a player?


  • Global Moderator

    Of you own RO2 you can see how its done over there maybe. As you can get the Bots to follow a player in that game.



  • @zombojoe:

    can you force them to follow some sort of moving object you can then attach to a player?

    That’s the problem, I have no idea where to find the “Pls follow this object” Kismet node.

    I could try to attach a pathnode to a player, but bots stand still and completely ignore them until a point of interest has spawned (such as an enemy).

    (Creating a dummy target at an unreachable area just so the bot has a reason to look for pathnodes won’t work, because then he’ll completely ignore actual enemies nearby.)



  • there is something like “focus on” as AI labelhttp://forums.tornbanner.com/showthread.php/21735-Tips-for-bot-pathing



  • You can try the ‘Set NPC Move Target’-node. Works in my map.



  • @Hordy:

    You can try the ‘Set NPC Move Target’-node. Works in my map.

    Ah yes, thank you! This worked nicely. At first didn’t seem to work because the bot was going for my spawnpoint instead of my actual position, so I attached an invisible interpactor to the player, and the bot is able to follow that without issues.

    1 question I hope you can help me with, though: Any chance you know how to temporarily disable the behavior when an enemy is near?
    I’m currently looping the command every 2 seconds and set it to interruptable, but it still happens that when the bot tries to go after an enemy, every 2 seconds it turns around and runs towards me first. Ends up in a pretty funny cycle where he just keeps making 180 turns until shot at, but not exactly what I was going for ;).



  • First thing which comes to my mind is to check if an enemy (other player or bot) is within range by using the distance node in kismet. You need to store all enemies in an object list for that. (like when player spawns check for team and add to the list)
    Second thing comming to my mind is to get the property ‘myCombatTarget’ from the bot which follows you. If it is set then stop following. Maybe you can also combine this with a distance check because the property contains a reference to an AOCPawn.