Author Topic: Event Onplayer at a certian velocity  (Read 515 times)

I need some kind of on player touch/activate/etc at velocity and then a field for numbers and ranges like 100-103, 13 would make it happen only if the player were going 100, 102, 103, or 13 [whatever units it is supposed to be in]. It would be useful for things like glass breaking.

Can be done with VCE and relays.

Can be done with VCE and relays.

Oh okay, I guess I will try to learn how to use VCE. Ty

Code: [Select]
[0] X 0 [onplayertouch] [self] [VCE_ifvalue] [<var:pl:velx] [>=] [13] [1 1]
[1] X 0 [onvariabletrue] [self] [VCE_ifvalue] [<var:pl:velx] [<=] [17] [2 4]
[2] X 0 [onvariabletrue] [self] [fakekillbrick]
[3] X 0 [onvariabletrue] [self] [playsound] [glassbreaking]
[4] X 0 [onvariablefalse] [player] [kill]

Just thought about it a little, might not work exactly, but it's what I did for the mining function in my City RPG

Code: [Select]
[0] X 0 [onplayertouch] [self] [VCE_ifvalue] [<var:pl:velx] [>=] [13] [1 1]
[1] X 0 [onvariabletrue] [self] [VCE_ifvalue] [<var:pl:velx] [<=] [17] [2 4]
[2] X 0 [onvariabletrue] [self] [fakekillbrick]
[3] X 0 [onvariabletrue] [self] [playsound] [glassbreaking]
[4] X 0 [onvariablefalse] [player] [kill]

Just thought about it a little, might not work exactly, but it's what I did for the mining function in my City RPG

Okay ty I will work with it when I figure out VCE better