Making a Thwomp like enemy.

Get help using Construct 2

Post » Wed Jul 13, 2016 8:14 pm

Message: Evanetot can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Recently, I've been trying to add new enemy types to my game. If it wasn't obvious through the title, it is a platformer. One of the enemy types I'm going for is a http://www.mariowiki.com/thwomp.

I've been using compare x to make them. But they glitch sometimes. I also want them to only hurt the player if they fall directly on the player. Can I get some help please?
Oh, okay.
B
23
S
5
Posts: 41
Reputation: 1,255

Post » Wed Jul 13, 2016 9:10 pm

Evanetot wrote:I've been using compare x to make them. But they glitch sometimes.


You will need to elaborate. What is your problem?

As for falling directly on the player... that would be a set of conditions, up to you to decide what is most suitable.

For example...
Thwomp On collision with Player
Thwomp is falling/moving
Player is within Thwomp.width/2 of Thwomp x position

Then do damage

Else (custom movement) Thwomp push player out at angle
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

Post » Wed Jul 13, 2016 9:26 pm

oosyrag wrote:
Evanetot wrote:I've been using compare x to make them. But they glitch sometimes.


You will need to elaborate. What is your problem?

As for falling directly on the player... that would be a set of conditions, up to you to decide what is most suitable.

For example...
Thwomp On collision with Player
Thwomp is falling/moving
Player is within Thwomp.width/2 of Thwomp x position

Then do damage

Else (custom movement) Thwomp push player out at angle





X as in, to compare if the players position on the x axis is close to the enemies x.
Oh, okay.
B
23
S
5
Posts: 41
Reputation: 1,255

Post » Wed Jul 13, 2016 9:32 pm

Yes, basically if your player x position is within the Thwomps width (assuming the origin point is in the middle of both).

Then you'll need to tweak it as you see fit. Does the player need to be completely under the thwomp? What happens on a partial squish? Or if they player moves into the side of it while it is falling? ect.
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests