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"

make a bot shoot through walls (and more)

i got a AI set up to work as a turret. he's standing outside a house i built, and i put pawn perception on hearing and seeing, and figured out how to make him shoot me when he sees me. problem is now that he wont shoot me if i am standing behind a object. since my game relies on projectiles that can penetrate walls, and also i have integrated a variant of the flak-cannon in my game, so i want my AI to strategically shoot at places where he thinks i might be standing around the corner, since the projectile shatters on imapct and damages anything nearby.

i tried so far with pawn sensing, and also i tried putting a trigger box. the trigger boxed worked, but was not so dynamic.

Product Version: UE 4.11
more ▼

asked Apr 01 '16 at 03:41 PM in Using UE4

avatar image

6 3 3

avatar image ViceVersa Apr 02 '16 at 03:25 AM

i havent tried the hearing functionality yet, though i would think thats your best bet. if thats not working you can try making a function that detects how far he is from the player, then a second function where he rotates towards him, and in event tick you can have him call those and then randomly shoot if the player the player is within the distance. Theres probably a better way for that for what your going for but thats the best off the top of my head

avatar image heyjoe Apr 05 '16 at 02:40 PM

yup, the "in range" thing worked. this is not very dynamic tho for gameplay. but it will have to do so far. :) i just changed the "AI bot" to a turret, so it makes sense.

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

0 answers: sort voted first
Be the first one to answer this question
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