Enemies that enter the layout, but dont leave the layout

Get help using Construct 2

Post » Wed Dec 17, 2014 2:42 am

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?? :D thanks!
You do not have the required permissions to view the files attached to this post.
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Wed Dec 17, 2014 8:56 am

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)
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 626
Reputation: 9,450

Post » Wed Dec 17, 2014 12:08 pm

@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
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Wed Dec 17, 2014 12:16 pm

Lunatrap you could try this way
You do not have the required permissions to view the files attached to this post.
B
252
S
39
G
15
Posts: 1,965
Reputation: 40,765


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, valefor and 24 guests