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"

AI attack both players? How?

Hey I want my AI to attack both my player 1 and player 2. Have tried now for many hours and also looking for videos about it. They are of course different character mesh

I use a blackboard and a behave tree. I have seen something about using "Get all actors by class" but the trail stops there. I wanna do it via BH and BB. Not pawn..

Can somebody help me plzzz :)

Product Version: Not Selected
Tags:
more ▼

asked Jul 12 '19 at 04:10 PM in Blueprint Scripting

avatar image

fryzz94
1 1 2

avatar image fryzz94 Jul 12 '19 at 07:34 PM

Bumping it up, i'm really stuck

avatar image fryzz94 3 days ago

does no one knows how to make the AI attack or follow player1 and player2?:(

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

2 answers: sort voted first

You may want to try get all actors by class and then, under the class option, select third person character. This will result in an array, do a for each loop out of the array so that you can cycle through the characters applying damage to all third person characters in this instance. You could limit damage to characters in a certain range or in line of site etc.

more ▼

answered Jul 14 '19 at 06:39 AM

avatar image

good4doog
1 1 1

avatar image fryzz94 Jul 14 '19 at 05:53 PM

Thank you for an answer, almost gave up on this. Well I try to understand what you mean, but I don't get it.. Uploaded pic for u to see, may look retarded haha.

This is probably not even hard to fix but It gives me so much frustration not know it...

Edit: When the AI see's player2 he's running to player1.. even when player1 is out of sight.. and range

ue4-loop-1.jpg (164.9 kB)
ue4-loop-2.jpg (159.6 kB)
avatar image fryzz94 Jul 14 '19 at 06:23 PM

So both Players are an Thirdperson.

I make an "create player" in the Level blueprint to get an splitscreen. I drag both players out into the level. But the AI just runs to Player1 even when the AI just see's player2. It's like the player1 is the magnet for the AI, even tho he see's player2.

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

Sphere Damage Actor

Hey fryzz94,

Here's a blueprint I made previously that does damage to all pawns within 1000 distance of the sphere mesh I had in the level. It's basically a pulsing orb and if things get to close it applies damage. I have a healing orb that heals, I use the same object just put in a negative damage (-5 for example). I'm just learning but hopefully this gives you an idea.

spheredamage.png (185.5 kB)
more ▼

answered Jul 15 '19 at 03:56 AM

avatar image

good4doog
1 1 1

avatar image fryzz94 5 days ago

Thank you for taking the time. Will this also make the AI follow both draged-in character?

Gonna try this soon.

(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