Problem with image points and collision polygon

  • I have set up three Image point for a sprite outside the collision polygon

    I have created a Spawn object (bala) action to spawn thr objects from the created Image points.

    I set up an action for collision of bala with cia and substract 1 from variable "Men" so when "bala" (bullet) hits another "cia" it kills one man.

    The problem is that when the object is spawn it substracts 1 "Men" to the "cia" which is spawning it although the spawn point is outside the collision polygon.

    Also the "bala" is only spawning from the "origin point" and not from the 3 created image points.

    When the "collision" event is disabled you can see only one bullet coming out.

    I've created a CIA2 object to reproduce the action and this one shows 3 bullets coming out

    The file is here

    www.regimientosdeamerica.com/bug/Combate 2v2.capx

  • Hi Daniel, I'm not sure what you're trying to do here or if this is really a problem with your events. Can you reproduce the problem in a new project with nothing but the thing that is going wrong?

  • i checked your cap and i noticed you set your animation to fire (cia) but on that frame there are no imagepoints, so it spawns from the origin, so it also collides with bala and substracts vars, so i dont think there's something wrong with the imagepoints

    i have modified the cap , when you do the select - space they shoot 3 ammo

    capx

  • Ashley

    I did it as you said in a new project and it works fine.

    Don't know what is going on in the other one. I will check the events

    Thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley, Vtrix

    I finally got it.

    When the sprite fires I change to an animation without imagepoints. That was what you mention Vitrix.

    Thanks you for helping to this "dummy"

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