How do I destroy this snake?

  • 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.


    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.

  • 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!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Awesome, thanks! I didn't think about the order of things, and it's straightened out a few other problems too. Appreciate it!

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