Platform objects that ignore jump-thru objects

Get help using Construct 2

Post » Thu Jul 04, 2013 12:09 am

I'd like to have enemies in my game stand on a jump-thru platform and toss grenade-like objects down at the player below. These grenade objects would ideally be able to use the platform behavior because of all the built-in physics that come along with it. But, I'd also need the grenade to pass through the jump-thru platform instead of resting on it. Is there any way of getting a platform object to completely ignore collisions with a jump-thru object?
(M.A.D. are my initials. I'm not the least bit angry, really!)
@madguy90
B
11
S
4
Posts: 41
Reputation: 1,671

Post » Thu Jul 04, 2013 5:31 am

Theres an action for the platform behavior "Jump Down" (Not sure if thats the exact name). You could do

Grenade on collision with jumpthruplatform
-> grenade Jump Down
B
46
S
14
G
7
Posts: 603
Reputation: 8,106

Post » Thu Jul 04, 2013 7:13 am

Tried that before-- the problem is, once a collision has occurred, the smooth "falling" flow is broken. When the grenade "jumps down", the Y vector gets reset.

I've attempted one solution where I track the Y vector number prior to the collision with the jump-thru floor, and then set the Y vector to that number immediately after the collision. Unfortunately, the "falling" flow still gets ever-so-slightly broken using this method.
(M.A.D. are my initials. I'm not the least bit angry, really!)
@madguy90
B
11
S
4
Posts: 41
Reputation: 1,671

Post » Thu Jul 04, 2013 8:17 pm

I was wondering if that would happen. Another solution is maybe use physics for your grenades instead of platform, then only give your non jump through platforms the physics behavior.
B
46
S
14
G
7
Posts: 603
Reputation: 8,106

Post » Thu Jul 04, 2013 11:27 pm

I suppose that would work, but I guess the issue there would be that I'd have to make all of my solid walls into physics objects, which could potentially be bad for performance even if they're just sitting there.. ah well, it's no big deal, I'll find a workaround. Just thought it seemed a bit odd that there's no built-in way to ignore jump-thru and only jump-thru.
(M.A.D. are my initials. I'm not the least bit angry, really!)
@madguy90
B
11
S
4
Posts: 41
Reputation: 1,671


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, David181, fens, rekjl and 11 guests