Different sprites coliding having different effect

So i want to make when Human (sprite 1) collects a coin (sprite 2) he gets 1 point, but when he touches an enemie (sprite 3) he losses two. How do i make this. (pls show it in picture)

Welcome Domen.

Programming Your App to Make Decisions explains how to determine what happens when one Sprite 'touches' another.

You would place your code probably in one of these Event Blocks depending on how you want this to work. See ImageSprite documentation

Ty, but this doesnt help, as these decisions dont work with sprites, beacuse sprites only have option do detect colliding with "other" so it doesnt know with what it collided, so how do i make it know that

Figure 17.9 in Creating Animated Apps might help Domen. Example shows using a Ball. Also works with a sprite. :astonished:

assuming Sprite2 is the enemy. :slight_smile:

1 Like

then use if else to determine who is the other.
if other is coin, bonus plus 1, else if other is enemy , then bonus minus 1.

Thank you so much, it works, you're a legend mate!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.