x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Friendly AI

Hello all! While looking through the code of shooter game, I noticed that the bot's enemy class is a Pawn. Doesn't that mean if creating friendly AI they'll attack the player as well? Or did i read it wrong? Because I am trying to make friendly AI, and plus how do I exclude players and only attack enemy pawns?

Product Version: Not Selected
Tags:
more ▼

asked Aug 06 '14 at 09:03 PM in C++ Programming

avatar image

FusionSticc
17 14 16 17

avatar image oscarperezart Dec 15 '16 at 09:28 PM

Can you show an image?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

A Pawn is anything that can have a controller, regardless of whether it's friendly or enemy.

See the docs here: https://docs.unrealengine.com/latest/INT/Gameplay/Framework/Pawn/index.html

more ▼

answered Aug 06 '14 at 09:57 PM

avatar image

MSE_Taliesin
274 33 49 65

avatar image FusionSticc Aug 06 '14 at 10:04 PM

Oh, well how do I specify what it attacks?

avatar image FusionSticc Aug 06 '14 at 10:04 PM

Instead of just saying the base class Pawn?

avatar image Jonathan Dorman STAFF Aug 06 '14 at 10:27 PM

If you're using Blueprints, you can create a variable called 'BadGuy' that is True for the enemies and False for the allies. You can check in the blueprint that the target is flagged as a BadGuy or not before the bot decides to shoot.

avatar image FusionSticc Aug 06 '14 at 10:28 PM

thanks for the help!

avatar image Jonathan Dorman STAFF Aug 06 '14 at 10:31 PM

No problem!

avatar image lovedoc99 Aug 09 '16 at 05:32 AM

I'm sort of really late and also new to blueprints, Could you explain how such a system would be layed out? Like, where would this variable be placed? In the BotShootEnemy blueprint? or the pawn blueprint

avatar image oscarperezart Dec 15 '16 at 09:30 PM

Can you show an image?

avatar image Kumar Chandra Jun 17 '17 at 07:20 PM

I'm really confused how to do this; I made a variable in the bot blueprint called Bad_Guy but now I don't know what to do. alt text

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question