Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Well, the title is very self explanatory.
Thanks in advance!
Turret doesn't shoot by itself, it triggers an event "On Turret shoot". Inside this event you can check that the turret is not overlapping an enemy, and only then create a bullet.
I think you didn't understand what I want, I want the turret to aim for a target only if there is no solid objects between them.
Your title says nothing about solid objects. "Collision" is when two objects touch!
You should use Line of Sight behavior. And instead of adding object to turret's targets, acquire and unacquire targets.
Here is a similar demo, you can add a solid wall to it and turrets won't shoot at targets that are behind the wall:
Develop games in your browser. Powerful, performant & highly capable.
Sorry, I meant collision as like, solid objects.
I thought of using the line of sight behavior, but as it may get overcomplicated, I posted it to see if anyone has come up with a better way to do it.