Author Topic: VCE Variables - Falling On Z-Axis  (Read 766 times)

Recently I'm trying to event something so when you are falling at a certain speed, the variable is true and it executes one line of events.

Code: [Select]
[0] [0] [onActivate] [Self] [fireRelay]
[1] [0] [onRelay] [Self] [fireRelay]
[2] [0] [onRelay] [Self] [VCE_ifValue] [<var:player:velz>] [>=] [12] [3]
[3] [0] [onVariableTrue] [Client] [centerPrint] [You are falling at a dangerous speed!]

Now when I jump-jet up, and my Velocity on the Z-Axis (speed) is greater than or equal to 12, the center print is displayed. But say I jump off a high height and descend at a high speed, the center print does not display. What am I doing wrong?

Velocity in a downward direction would be negative.
Try <= -12  (less than or equal to to negative 12).

Velocity in a downward direction would be negative.
Try <= -12  (less than or equal to to negative 12).

Ah I see, thank you.

Ok new problem, the events do not work with other people, only me.

Code: [Select]
[0] [0] [onPlayerTouch] [Self] [fireRelay]
[1] [0] [onRelay] [Self] [fireRelay]
[2] [0] [onRelay] [Self] [VCE_ifValue] [<var:player:velz>] [<=] [-12] [3]
[3] [0] [onVariableTrue] [Client] [centerPrint] [You are falling at a dangerous speed!]

you are using relays, one relay per brick, use print counts as you can use as many as you need per brick

forgot to say, the falling damage kill speed is 30 :D

Post this on the VCE topic too.

you are using relays, one relay per brick, use print counts as you can use as many as you need per brick
Code: [Select]
(0)   onActivate        ->         Self ->  incrementPrintCount -> 5
(33) onActivate        ->         Self ->  incrementPrintCount -> 5
(00) onPrintCountOverflow -> Self ->  incrementPrintCount -> 5
(33) onPrintCountOverflow -> Self ->  incrementPrintCount -> 5
(00) onPrintCountOverflow -> Self ->  VCE_ifValue     ->        <var:pl:velz> -> <= -> -30 3
(00) onVariableTrue     ->     Client -> centerPrnt      ->        "You are falling at a dangerous speed!"

Does not need to be used on a print brick.

Code: [Select]
(0)   onActivate        ->         Self ->  incrementPrintCount -> 5
(33) onActivate        ->         Self ->  incrementPrintCount -> 5
(00) onPrintCountOverflow -> Self ->  incrementPrintCount -> 5
(33) onPrintCountOverflow -> Self ->  incrementPrintCount -> 5
(00) onPrintCountOverflow -> Self ->  VCE_ifValue     ->        <var:pl:velz> -> <= -> -30 3
(00) onVariableTrue     ->     Client -> centerPrnt      ->        "You are falling at a dangerous speed!"

Does not need to be used on a print brick.
Would be easier to just call an un named function and make a variable loop.

Whatever floats your boat though. Same effect.

Thanks for the help guys.

forgot to say, the falling damage kill speed is 30 :D

Ah yes, true. But still, falling damage doesn't go right ahead and kill you, it can inflict damage. I would say that any speed is dangerous as long as you are going to be damaged.