# Jump Over Enemy And Receive +1 Score ??

Get help using Construct 2

### » Sun Feb 16, 2014 1:20 pm

Hello Folks.
I'm pretty new at Construct 2.
Trying my very best to create a simple game.

Im nearly done.
I just need to add the score.

My Question Goes:

I want the player to receive 1 Score each time he jumps over an enemy.

Example:

Im the player.
A rolling stone is coming towards me.
I jump over it.
I receive 1 Score for jumping successfully jumping over the enemy.

Any ideas on how to do this.
I've tried several ways that i could think of.

Hope there's an ekspert out there just waiting / dieing to reply on this :)

Take care.
Chansen2014-02-16 13:22:10
B
11
S
3
Posts: 31
Reputation: 814

### » Sun Feb 16, 2014 1:30 pm

There are two methods. You could have a collision sprite that is pinned to the rolling stone, and when the player collisdes with that, you add 1 to the score.

Alternatively, you can compare x position to check if the player is on or close to the x position of the stone.
B
98
S
20
G
8
Posts: 1,066
Reputation: 12,758

### » Sun Feb 16, 2014 2:00 pm

The thing is. If the player touches the stone, he dies. The player may not at any time collide with the stone(s).

I need to make this so that when the player is above the stone the player gets 1 score.

Any idea how this could be done ?
B
11
S
3
Posts: 31
Reputation: 814

### » Sun Feb 16, 2014 2:04 pm

That's what I meant. The x axis is only the horizontal position. And the collision sprite I referred to could be taller than the stone... meaning the height of the screen.
B
98
S
20
G
8
Posts: 1,066
Reputation: 12,758

### » Sun Feb 16, 2014 2:07 pm

Could you give an example on how this would look.
As mentioned, im new :)
Bear with me.
B
11
S
3
Posts: 31
Reputation: 814

### » Sun Feb 16, 2014 2:53 pm

Tried what you said in a couple of ways, and i figured out how to do so.

If someone else is curious or don't know how to do this, I'll try to explain what i've done to make it work.

How To:
When the stone comes towards you, you wanna jump over it and get a 1 score.

What i did was to simply pin aka attach a sprite which i made a long tin line from top to buttom of screen to the enemy so that when the player jumps and collides with this sprite it adds 1 score.

Thanks for the help and tips AnD4D

Take Care.
B
11
S
3
Posts: 31
Reputation: 814