Enemies that enter the layout, but dont leave the layout

0 favourites
  • 4 posts
From the Asset Store
A complete set of graphical user interface (GUI) to build 2D video games. With wood, nature, & jungle theme
  • Hi!! see, i make my enemies respawn outside of the layout and i make them enter the layout so i can give them some respawn protection, so i need my enemies (in this instance represented by tanks) to enter the layout but to dont be able to leave it.

    I tried respawing my enemies with the bound to layout bahaviour disabled and then when they enter the layout, enable it, but bound to layout has no otion to enable / disable (wich in my opinio should have).

    And then i tried making the walls of a solid tiled background ( my prefered option ) and respawn the enemies so hey will not make collision with the wall , until they enter the layout, and then they will collide with solids, but i did not find any way to do this.

    any help?? thanks!

  • try this - spawn enemy outisde the layout / walls (give him bound to layout ofc), then let him go towards the block / entrance whatever

    and disable it's collision. it will pass through the wall, and once it's in layout, enable it's collision back. (tanks collision). tank won't collide with solid if it has disabled collisions, or vice versa.

    also read this - https://www.scirra.com/manual/89/bound-to-layout you can try hocus pocusing it with imagepoints (probably too difficult)

  • Try Construct 3

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

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

    i tried that, but where do it disable collision? i tried disabling one option called "collision enabled" but i did not worked :/

    the solid behaviour should have a tag system, so some desired objects will pass them

  • Lunatrap you could try this way

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