Shield For Protection - Im Confused, Help Please

hi guys,

im thinking to create another powerup but this time it will give shield protection. Just like in 2d ship game or better like in “Ninjump” of android game. When you get the shield, it will prevent you to instant death when the player collide with specific object.

How do I do this in corona?

Problem is, i have a game where different objects falling from the sky and the character is supposed to collect object 1 and avoid object 2. If the shield has collision, most likely it will collide with both object 1 and object 2. What I want is for the object 1 to be able to “skip” collision with the shield and goes to the player directly (to perform the adding score function). While when he hits object 2, of course the shield should break off and then the player will die whenever he hits this object 2 without shield. [import]uid: 114765 topic_id: 20702 reply_id: 320702[/import]

Go to the physics bodies documentation and read about collision filters. You can set it so that your collectables don’t collide with the shields, only the player and your non-collectables collide with both the shield and player. I’m assuming you’re using physics for this.

[import]uid: 19626 topic_id: 20702 reply_id: 81282[/import]

http://developer.anscamobile.com/forum/2010/10/25/collision-filters-helper-chart [import]uid: 16142 topic_id: 20702 reply_id: 81283[/import]