***RESOLVED*** Disappearing platform issue.

Get help using Construct 2

Post » Tue Jun 12, 2012 9:45 pm

Hey guys,
I have a problem with a disappearing platform.

I need the platform to only be present when a global variable equals a certain number.

For example, it's there when somethingvariable = 1, but not when somethingvariable = 2.

I need to do this without destroying it unless there's a way to destroy and create it in the exact same place/position with the appropriate variable value.

So far I've been switching the solid and visible behaviours but when the platform disappears (through using solid/visible disabled) the platform acts solid but invisible while the player is standing on it but the minute they step off it's no longer solid. They can also jump off it in this state.

Many thanks in advance.

MikeMikeMurrayFTW2012-06-24 14:41:43
B
4
Posts: 4
Reputation: 608

Post » Tue Jun 12, 2012 9:54 pm

You could move the player up a pixel after setting solid disabled to "unstick" him. Or you could move the platform off the screen when var=2 and back into position when var=1. ramones2012-06-12 21:55:46
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Tue Jun 12, 2012 10:07 pm

There are going to be quite a few of them so I'd rather find a way that can keep them where they are.

Affecting the player's movement is tricky as this effect can be used while the player is jumping so I want to avoid disrupting the jump by affecting them speed/position of the player.

What I need is something that says, "look, mate. That block you were standing on before has gone. Wake up and fall now."
B
4
Posts: 4
Reputation: 608

Post » Tue Jun 12, 2012 10:27 pm

Move the platform down a pixel when you hide it and back up when you show it.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Tue Jun 12, 2012 10:29 pm

Moving the object one pixel up like ramones suggested is what I use for the wake up call you're talking about. When the platform change happens and the object is overlapping a platform, set the object's Y to Self.Y-1.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Jun 24, 2012 2:41 pm


***RESOLVED***

Hey folks, sorry about the late reply, especially after you all responded so quickly.

In the event that changes the variable that causes the blocks to disappear, I just added another event that set "Player.Y-1". As explained by all above, this "unstuck" the player object, nor does it interfere with the jumping of the character.
B
4
Posts: 4
Reputation: 608


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests