Collision parameters

Hi everybody, in a game like ghosts vs monsters for example how can I make the object stay on the same place where the first collision happen and at the same time change it image. For example when the ghost hit some object stay stucked (like glue) in that object and change the ghost for a very painful ghost.

Thanks and best regards

If you're asking what I believe you are, you would remove the first object/image and add in a new one so it appeared to change. Or, alternatively, you could use a sprite if you want a little animation.

Asking this question would yield better results if you used a title like "changing an image?" as it isn't really about collision as I can tell, just what functions happen on collision.

Hope that helps!

Peach :)

OK. Thanks, this solve my second question. In my first question (and this is why I put collision parameters on the subject) I would like to know how to make the ghost stay fixed on the place that the collision happen. Just like a throwing darts for example.

Thank you and regards.

I believe Peach answered both. You remove the first image, then you place a new image. The new image does not need a physics body so it won't move, or if it does need physics just give it a static type body.

As aaaron said; either it's an image and wont move, or if you need it to have physics making it static will ensure it stays in the same place.

Make sense? :)

Theoretically it make sense to me but as I´m a absolut beginner (and this is why i´m using Ghosts vs Monsters as a sample) do you have a small part of code to give me as sample (for reference). Sorry for aks that, i´m really trying to learn and i´m sure that will help me a lot.

Thanks and regards.

views:1590 update:2011/10/1 9:04:19
corona forums © 2003-2011