How do I Fall to death from specific height

Get help using Construct 2

Post » Tue Jun 10, 2014 6:08 am

Hi.

I am trying to test the current speed the character is falling at.
However platform speed does not test this.

How do i get a variable to know when the character is falling at a certain speed.
I set up my character to have a max fall speed variable. Once the Vector Y reaches 1100 it triggers.
However i dont know how to actually look for the Vector Y because platform behavior does not have this
Last edited by Ldk on Tue Jun 10, 2014 7:06 am, edited 1 time in total.
B
8
S
2
Posts: 163
Reputation: 1,115

Post » Tue Jun 10, 2014 6:48 am

Basically i want the player to die when falling from a certain height.
But the player can break his fall by sliding down the walls.
B
8
S
2
Posts: 163
Reputation: 1,115

Post » Tue Jun 10, 2014 7:09 am

Ahh i found something that works.
Created a global variable (FallSpeed). Set an event that if you are falling add 0.5 to Fallspeed.
If player is sliding down wall set Fallspeed to 0.

Works :)
B
8
S
2
Posts: 163
Reputation: 1,115

Post » Thu Jun 12, 2014 8:34 am

VectorY is an expression of the Platform behavior. https://www.scirra.com/manual/100/platform
A positive VectorY means the player is falling. It works correctly; I have used it to implement fall damage.
B
12
S
3
Posts: 39
Reputation: 1,001

Post » Mon Jun 23, 2014 3:47 pm

Hmm. How do you get the VectorY or VectorX
My C2 does not have this as expressions. I can only set them but cannot get any information from them
B
8
S
2
Posts: 163
Reputation: 1,115

Post » Mon Jun 23, 2014 3:50 pm

Oh i see you have to say "Object".Platform.VectorY or VectorX
B
8
S
2
Posts: 163
Reputation: 1,115

Post » Mon Jun 23, 2014 3:55 pm

Ldk wrote:Oh i see you have to say "Object".Platform.VectorY or VectorX


Yup, this is the correct syntax, also when you can enter an expression, I think C2 has a pop up (f4 can make it appear and disseapear), that basiccalye let you select the avaliable expressions for each object (you select the object, then the expression)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123


Return to How do I....?

Who is online

Users browsing this forum: eochranek, Unconnected and 17 guests