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
54
S
23
G
18
Posts: 2,123
Reputation: 17,200

Post » Tue Mar 20, 2018 5:10 pm

Hello there, my first message here !! since I began to use construct, I'd always find answers for my so many questions here, by reading you guys.
But, I must confess, I'm a little bit stuck now.
Let me explain, I want my player to die after a fall of a specific height. But I want to him to die on landing, not at the moment he will cross this specific heights.
I used vector Y expression to show me the speed of falling and set a speed comparison to trigger death.
It works great, but when I had a sub-event "on land" or "not moving" and thing like this, it doesn't work. Maybe it's not the better way to do it....

Please show me light and keep the goos work !

THX
B
3
Posts: 2
Reputation: 179

Post » Tue Mar 20, 2018 5:56 pm

@ladydye Hey there! Set a timer that begins when the player is not on the ground. If the timer is greater than a set value when the player hits the floor kill your player. If the value is not great enough to kill the player when they hit the floor, set the value to 0 when they land.
B
80
S
48
G
30
Posts: 419
Reputation: 22,513

Post » Thu Mar 22, 2018 1:43 pm

pretty simple uh!!?? works fine, thank you so much !
B
3
Posts: 2
Reputation: 179


Return to How do I....?

Who is online

Users browsing this forum: fbarraza28 and 4 guests