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.

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

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