Jump Over Enemy And Receive +1 Score ??

Get help using Construct 2

Post » 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

Post » 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.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
81
S
13
G
7
Posts: 967
Reputation: 10,879

Post » 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

Post » 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.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
81
S
13
G
7
Posts: 967
Reputation: 10,879

Post » 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

Post » 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:
First of all you have your player and your stone.
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


Return to How do I....?

Who is online

Users browsing this forum: Kin, Yahoo [Bot] and 42 guests