How do I fix this!

Get help using Construct 2

Post » Wed Jun 24, 2015 3:43 am

hello everyone
i have a problem with the animations of one enemy in my game here is the capx
https://dl.dropboxusercontent.com/u/854 ... lator.capx
run the game and use the ok button to spawn the enemies, the problem is that if you set their hp to a number higher than 24 the animations doesnt play,
set their hp to someting lower like 3 and kill them and they will play it correctly ,idk what to do to fix it, also sometimes it works if only one of that kind of enemy is on the screen if there are more the animations doesnt work. the hp is on the sprite called gordo_1. you hit with the d key.
thx! :P
B
18
S
2
G
2
Posts: 82
Reputation: 1,737

Post » Wed Jun 24, 2015 6:56 am

Hello friend, I downloaded your .capx and after a few tests I found out what is going on.

You see the problem here is the position of the object that you called "Barrier". If you set the Gordo HP for a value really low, or increase the player's attack, you'll manage to defeat the boss pretty early, destroying it while it's still in the middle of the screen.

When you set the player attack to 1 and the boss HP to 30, it take too long for the player to defeat the boss, and when you finally manage to defeat it, it's already too close to the end of the screen, and then the problem here is the boss animation "die" has a HUGE collision box, way bigger than the collision box of its other animations. So you manage to kill the boss and the "die" animation works normally, but since its collision box is so big it hits the "barrier" object and destroys the enemy before the animation happens.

To solve that you can either decrease the size of the "die" animation collision box, or push the barrier a little bit backwards so the boss has more space to die, or add a condition to only destroy the boss when it hits the barrier IF "die" isn't playing.

The game looks great by the way, keep up the good work ^^
B
17
S
7
Posts: 277
Reputation: 2,514

Post » Wed Jun 24, 2015 7:08 am

@rayki I've never thought that! xD many thanks really i remade the movement events over and over again but i couldnt figure it out, the next time i will be more careful about the size of the sprites and their collision boxes
B
18
S
2
G
2
Posts: 82
Reputation: 1,737


Return to How do I....?

Who is online

Users browsing this forum: Fenix18, tarek2 and 55 guests