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"

Im looking to create an auto turret that rotates left and right until the player is spotted

I have looked for many tutorials but i am unable to find one thats right for what i need;

The turret needs to oscillate left and right and then target the player once it has come in the its field of view and once the player has evaded the turret and remained out of sight for (set amount of time) the turret returns to oscillating left and right.

Thanks

hope this was explained well.

Product Version: UE 4.18
Tags:
more ▼

asked Mar 20 '18 at 02:11 PM in Blueprint Scripting

avatar image

DrPineapple21
1 1 3

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

1 answer: sort voted first

something like the below picture should work. basically at a regular interval it rotates the turret in the direction dependent on the switch. once the turret reaches a certain rotation (limit) it sets a variable so the next time the script is called it will go in the other direction. the gate near the beginning also gets set to closed when the target is seen which stops the rotation. this type of thing could also be done with a timeline which may be a bit more performant but is also slightly more complex

alt text

capture.png (232.0 kB)
more ▼

answered Mar 20 '18 at 03:54 PM

avatar image

ThompsonN13
10.4k 34 10 27

(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