Enemy issue

This forum is currently in read-only mode.
From the Asset Store
Pixel Enemies for SHMUP consists of 45 enemy ship sprites to be used in your game.
  • I'm having trouble with an enemy. I have to fall on a specific part on what seems like a specific frame for it to register I'm hurting it. Or if I'm not falling I have to be practically half way inside of it for register that it should attack. Can someone please help.

  • Sounds like the a collision mask problem, can you post the cap/source?

    Failing that, try changing the collision method from "per pixel" to "bounding box"

  • I probably sound really stupid but how do you add a attachment?

  • The forums used to allow it, but I don't know if they do anymore. I'd recommend getting DropBox https://www.dropbox.com/home

  • Heres a CAP File

    http://dl.dropbox.com/u/30677634/EnemyProblem.cap

    Yeah and it works slightly better in this cap than in the game but still only works half the time.

  • To be more specific I find that it usualy only works on the middle frame of the crawl animation when i hit the arc in the middle of it.

  • First off, don't use your character sprite to detect collisions. You should use your Pbox object.

    Secondly, your worm animation is changing size much too dramatically to use Bounding Box collisions. You need to either use Per Pixel, or redesign your worm so it's more consistently uniform, and then give it a collision box similar to your player's Pbox.

    Thirdly, you have some really odd conditions here, and I don't understand why you would need them:

    <img src="http://i55.tinypic.com/123pbw9.png">

    Why is the worm's attack animation important in figuring out whether or not there is a collision? Why is the player sprite's angle important? You're trying to do too much at once in one event, and you're getting your order of events all wonky.

    You need to think a bit more logically about how the attacks take place. As a general rule of thumb, when making your conditions you need to filter them from the very basic (two sprites colliding) at the top, and work your way down towards the more specific things (is an animation playing?) towards the bottom, or in your sub-events.

    So, what is the very first thing that happens when checking for an attack? Two sprites collide, that's what. What next? Well, you need to know if the player is falling, or if he's just standing there. Etc. This other stuff either isn't important, or it's out of order, and that is the reason your combat is behaving so randomly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks alot it's working better now.

    Oh yeah and the reason the events look funny is because My actual game requires a few extra conditions that arent shown like if hes swinging a weapon.

    Heres a fixed product of my example.

    http://dl.dropbox.com/u/30677634/EnemyProblem2.cap

  • Oh yeah I forgot to ask if anyone knew how to get my worm to stop traveling left and right while its going up. You can see the problem in my fixed example as well as the original.

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