Tanks with LoS & Turret behavior vs Enemy with Solid behavior?

0 favourites
  • 6 posts
From the Asset Store
Enemy turtles pack including fifteen fully animated variations
  • Hello,

    I'm making a game that has tanks which have the LoS And Turret behavior. Now I am able to make the tanks fire at enemy objects. These enemy objects however, also need to be solid, as I don't want the tanks to be able to drive right through them, nor do I want the tanks to be able to 'see' through them.

    Problem is however, that the tanks won't shoot at these enemy objects if you either make the object a solid, or put a seperate solid sprite underneath or on top of the enemy object.

    How can I go about accomplishing this?

    P.S. I also noticed the tanks will fire directly at the original image point of the enemy object. The tanks will need to be able to 'see' the image point, apparently?


  • On LOS behaviour set obstacles to Custom instead of Solids.

  • Yeah, but there is no setting on Turret behavior to ignore Solids, so I'm afraid the only solution is to not use Solid on enemies. You'll need to prevent collision of tanks and enemies with events.

  • OP said is adding a turret target based on LOS behaviour so it's possible. Kind of a redundant use of LOS behaviour though unless it's to make use of cone of view.

  • I don't think Turret will fire at a target which is blocked by solid.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hiya,

    Sorry for the late reply. I replaced the LoS with a circle so now it checks on overlap. That does seem to work. I did wanted a 360 cone of view.

    Now the collision polygon isn't entirely round, as C2 recommends a max of 8 points. Would it hurt to have more, say maybe 16? I have cloned the circles because I believe it's necessary to have one for each tank.

    But I figure 16 points would be too much considering I will have like 8 controlable tanks.


Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)