Problem with image points and collision polygon

Bugs will be moved here once resolved.

Post » Sat Nov 26, 2011 7:28 pm

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
B
12
S
2
G
2
Posts: 28
Reputation: 1,695

Post » Thu Dec 08, 2011 11:06 pm

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?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Thu Dec 08, 2011 11:46 pm

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
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Sat Dec 10, 2011 1:30 pm

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
B
12
S
2
G
2
Posts: 28
Reputation: 1,695

Post » Sat Dec 10, 2011 2:08 pm

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"
B
12
S
2
G
2
Posts: 28
Reputation: 1,695


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests