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"

How to randomize the loop with no of actors in the level

Hello Guys,

I'm trying to make a Turret, which shoots at player. I am trying to use tags to determine which actor the turret should target. When I try to use it, I get location of each player and turrets placed in the level with a loop it actually mixes up with other locations and then when I try to play, It actually messes up all locations and when I play, it only attacks one actor inspite of having other targets too. This is in a Turret Actor Blueprint.
This is what I am trying:

alt text

This works when there is only one target in the level which the turrets have to target. But when there are multiple elements it has to target, It actually messes up. Any help is kindly appreciated.

Q: What I Acutally Want to have?

  • A Turret which shoots down any actor with tag "Target" and turret should chose the nearest enemy and should shoot down.

Product Version: UE 4.21
capture.png (370.3 kB)
more ▼

asked Mar 15 '19 at 07:15 PM in Blueprint Scripting

avatar image

Harsh Bakshi
7 1 1 1

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

1 answer: sort voted first

You only have the write the code for one turret ( inside the BP ). Then the other turrets will do what you want as you copy them across the level.

So the whole turret loop is redundant.

Do you get it?...

( maybe this is your level BP ). Not the way to do it. Just write the turret BP and copy the turret actors.

more ▼

answered Mar 15 '19 at 07:54 PM

avatar image

220 3 4 4

(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