Blob Companion with Platform behavior - capx

Get help using Construct 2

Post » Fri Mar 23, 2012 1:39 pm

Hey guys, this is my first post around here, and this is also my first game project. I need some help

Basically I created a companion based on the "fairy companion" tutorial, but with a platform behavior added to it. This sprite, named as "comp" needs to act like a "blob jumping thing" (as seen in the game A Boy and his Blob) and follow the player through the platforms.

I'm having issues with the way it acts though, I've set two instance variables "following" and "standing", that works according to Player bounding box imagePoints distance and collision. I need the "blob" to smoothly stop "bouncing/jumping" while it gets closer to the player.

The logic I used behind it is probably wrong or too clumsy (the blob thing only jumps/bounces because it was set to follow an image point high above the head of the player (lerp(self.y, Ytarget, dt)), and the gravity of the platform behavior keeps "pulling" it down.





Also, I'd need help to move the "comp/blob" to an image point next to the player on R pressed, so I've set "keybord-> on R pressed-> set position...." but its instantly moved. I'd like it to smoothly reach its position next to the player. It would be awesome if the blob could jump to high platforms and not fall in every gap too.


Well, I can't express myself correctly in english, so enough with the clumsy text, here's the .capx


capx_file
(use W,A,D for moving the player)

Thanks a lot for the help! murilokleine2012-03-23 14:22:04
B
12
S
4
G
2
Posts: 20
Reputation: 2,625

Post » Fri Mar 23, 2012 3:26 pm

hmmm anyone?
B
12
S
4
G
2
Posts: 20
Reputation: 2,625

Post » Fri Mar 23, 2012 3:30 pm

Rather than have the blob character move straight to the image point, have the position moved toward the image point every tick by a few pixels.

For the bounce behavior, decrease the amount of bounce depending on the distance from the player. There's a distance equation in the System object that can help with this.

Hope that helps some! I did like the game boy and his blob, but never did beat it
B
19
S
2
Posts: 37
Reputation: 1,464

Post » Fri Mar 23, 2012 4:42 pm

Thanks for the reply sketchee, but I think the first condition you mentioned is already applied. :)

As for the bounce behavior, how can I decrease the amount? I didn't set any variables to make the sprite bounce, it's just the result of the blob character following an imagepoint with platform behavior enabled(to the blob). Can you please explain further? I'm posting a printscreen of the event sheet group related to the blob character.




Is it possible to achieve better results with physics maybe?

Thanks man!murilokleine2012-03-23 16:45:03
B
12
S
4
G
2
Posts: 20
Reputation: 2,625

Post » Fri Mar 23, 2012 7:13 pm

anyone else? ^^
B
12
S
4
G
2
Posts: 20
Reputation: 2,625


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests