[SOLVED] Why my character doesn't push the box well?

Get help using Construct 2

Post » Mon Jul 03, 2017 7:51 pm

Hi guys!

I'm trying to implement the ability to push objects into my game character (something I thought would be fairly easy), but it's not working well.

The character pushes very slowly, the defined animation isn't play and after a short time, the character stops pushing the box.

If anyone can collaborate, I leave here the CAPX for analysis and corrections.

https://ufile.io/9m53j

Thanks in advance! :D
Last edited by lukezero on Mon Jul 03, 2017 9:03 pm, edited 1 time in total.
B
38
S
9
G
3
Posts: 257
Reputation: 4,316

Post » Mon Jul 03, 2017 8:41 pm

It's because he failed his ninja training and the box is too heavy. Also it's because you have on collision with box which only ever triggers once, when you are pushing against it you have already collided. For stuff like this I use overlapping at offset, that way you can constantly detect when the player is close to the box. The animation can be fixed by disabling some of the Walk animation events when you are pushing the box, at the moment they just override everything and try and walk whenever the player moves.

https://www.dropbox.com/s/b0suhzzn6d9mb ... .capx?dl=0
B
45
S
15
G
73
Posts: 2,006
Reputation: 43,394

Post » Mon Jul 03, 2017 9:02 pm

plinkie wrote:It's because he failed his ninja training and the box is too heavy. Also it's because you have on collision with box which only ever triggers once, when you are pushing against it you have already collided. For stuff like this I use overlapping at offset, that way you can constantly detect when the player is close to the box. The animation can be fixed by disabling some of the Walk animation events when you are pushing the box, at the moment they just override everything and try and walk whenever the player moves.

https://www.dropbox.com/s/b0suhzzn6d9mb ... .capx?dl=0


LOL! Thank you very much, dude! :D

Just one question: why the box is moved in a shaken way? Can we move it smoothly?
B
38
S
9
G
3
Posts: 257
Reputation: 4,316

Post » Mon Jul 03, 2017 9:11 pm

Ah yeah sorry I set the speed of the box to 1000 for a test, set it to 40 or something. It does bounce around a bit, can probs be fixed if I looked into it more.
B
45
S
15
G
73
Posts: 2,006
Reputation: 43,394

Post » Mon Jul 03, 2017 9:37 pm

plinkie wrote:Ah yeah sorry I set the speed of the box to 1000 for a test, set it to 40 or something. It does bounce around a bit, can probs be fixed if I looked into it more.


Thanks, man. ^_^
B
38
S
9
G
3
Posts: 257
Reputation: 4,316

Post » Tue Jul 04, 2017 12:04 am

@plinkie, sorry to bother you again, mas but do you have any idea why the character's animation hangs while he pushes the box?
B
38
S
9
G
3
Posts: 257
Reputation: 4,316

Post » Tue Jul 04, 2017 7:53 am

It doesn't hang as such, you just have it set to Stop when pushing, which is one frame. There's no push animation.
B
45
S
15
G
73
Posts: 2,006
Reputation: 43,394

Post » Tue Jul 04, 2017 11:03 am

plinkie wrote:It doesn't hang as such, you just have it set to Stop when pushing, which is one frame. There's no push animation.


In the CAPX that I posted here, but in my game's prototype I put an animation for it and it isn't activated. :cry:
B
38
S
9
G
3
Posts: 257
Reputation: 4,316

Post » Tue Jul 04, 2017 11:46 am

Well, I'm no magician :D
B
45
S
15
G
73
Posts: 2,006
Reputation: 43,394

Post » Tue Jul 04, 2017 12:22 pm

plinkie wrote:Well, I'm no magician :D


:lol: :lol:

I used the same routines/events/principles.

Again, sorry to bother you and thanks. :D
B
38
S
9
G
3
Posts: 257
Reputation: 4,316


Return to How do I....?

Who is online

Users browsing this forum: Linetaru, Yahoo [Bot] and 8 guests