Announcement

Collapse
No announcement yet.

Changing the ShooterGame Example BotPawn?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changing the ShooterGame Example BotPawn?

    Hello everyone!

    How are you all?

    I was just using the ShooterGame as a base for my own FPS, but ran into a problem when I found that the BotPawn was scripted to attack everyone.

    He will attack both the player and other bots.

    Is there any way to get him to ignore other bots and only attack the player OR have him ignore the player and only attack other bots?


    Thanks,

    ~ Jason
    Jason's Simple Systems

    Enemy AI and Patrol: https://forums.unrealengine.com/comm...troling-damage

    Basic Quest System: https://forums.unrealengine.com/comm...ystem-part-1-1

    #2
    Most of the logic for the bot finding who to shoot is done within C++. This Service(BotSearchEnemyLOS) calls functions within the ShooterAIController, which is a C++ class, so you would either need to change the logic within ShooterAIController or make your own logic within Blueprints.

    I would recommend using AI Perception and EQS for creating your custom bot logic. If you don't know how to use these, Epic has a great tutorial on how to use them.

    This is the Service that finds the bot's enemy.
    Click image for larger version

Name:	BotSearch.png
Views:	1
Size:	184.4 KB
ID:	1083346

    You could change it to this so it only picks the player as its enemy. This is far from the optimal way to do this though.
    Click image for larger version

Name:	BotSearchModified.png
Views:	1
Size:	81.2 KB
ID:	1083347

    Alternatively you could delete BotSearchEnemyLOS from the BotBehavior tree. Then create a new AI controller that extends from ShooterAIController. Then set the bot's enemy to the player (like I did in the BotSearchEnemyLOS Service) with the Begin Play event. Once again this isn't the best way to do this, but it is a quick way to get what you want. Like I said before, I recommend using the AI Perception and EQS to get the Bot to do what you want.
    Click image for larger version

Name:	BotBehaviorTree.png
Views:	1
Size:	27.4 KB
ID:	1083348
    Last edited by drb1992; 08-07-2015, 07:56 AM.
    Logitech Wheel Plugin

    Comment


      #3
      Thanks for the info!

      It helped a ton!


      ~ Jason
      Jason's Simple Systems

      Enemy AI and Patrol: https://forums.unrealengine.com/comm...troling-damage

      Basic Quest System: https://forums.unrealengine.com/comm...ystem-part-1-1

      Comment

      Working...
      X