How do I destroy this snake?

Get help using Construct 2

Post » Tue Jun 24, 2014 6:35 am

Hey there

So I'm trying to make these snakes that can climb walls, but get destroyed once they hit a ceiling.

(If you've played Mega Man 3, think of Snake Man's weapon)

I can get them to climb the walls, but the same logic somehow isn't destroying them. After the climb up, they go straight through all the other walls.

I've attached the code and the layout. If anyone has any ideas or clues, I'd be very grateful. I'm sure I'm missing something obvious.

-brush

PS The snakes are shot from the main character as a jump attack, so there's a little platform behavior to have them 'hop' out when created, fall straight down, and then start crawling. You'll see that in the code. That all works fine; they just won't collide with the wall after they start climbing.
You do not have the required permissions to view the files attached to this post.
B
21
S
5
G
3
Posts: 67
Reputation: 2,850

Post » Tue Jun 24, 2014 7:20 am

@brushfe : your problem is that the condition of destruction is only checked once, upon creating the snake.
You just want your overlap condition not to be a sub-event of the creation line. Simply drag it slightly down and left in the event editor and you'll be good to go.

Good luck with your project!
B
79
S
22
G
4
Posts: 311
Reputation: 12,774

Post » Tue Jun 24, 2014 12:34 pm

Awesome, thanks! I didn't think about the order of things, and it's straightened out a few other problems too. Appreciate it!
B
21
S
5
G
3
Posts: 67
Reputation: 2,850


Return to How do I....?

Who is online

Users browsing this forum: dop2000, KTML5 and 25 guests