Author Topic: Speedometer  (Read 922 times)

To tell you how fast you are going, this would be nice.

Been done before, but can't find it.

I might be wrong but wasn't it crap-onned?

Been done before, but can't find it.
T'was fail binned cause who ever made it made it badly.

it created horrible brick lag, i could only get 10-15k bricks without lagging badly, now it's like 50-70k

i would love to see this remade, but without screwing up brick loading

it created horrible brick lag, i could only get 10-15k bricks without lagging badly, now it's like 50-70k

i would love to see this remade, but without screwing up brick loading

Yeah....

You can make a speedometer with the VCE.

You can make a speedometer with the VCE.
But it would take a lot of events.



Long story short:

X = velX
Y = velY
Z = velZ

X = X^2
Y = Y^2
Z = Z^2

X = X + Y
X = X + Z
X = sqrt(X)

Speed = X

centerPrint [var:Speed]

Long story short:

X = velX
Y = velY
Z = velZ

X = X^2
Y = Y^2
Z = Z^2

X = X + Y
X = X + Z
X = sqrt(X)

Speed = X

centerPrint [var:Speed]

What?

Long story short:

X = velX
Y = velY
Z = velZ

X = X^2
Y = Y^2
Z = Z^2

X = X + Y
X = X + Z
X = sqrt(X)

Speed = X

centerPrint [var:Speed]
What? you know what just put the events as a .txt file and put a readme on how to do it

You can make one by spamming console commands. Echo(Getcontrolobjectvelocity()); Maybe.

Fine. Just because I can, I made this measure Speed, Acceleration, and Maximum Speed.


[X] 0 [0] onActivate -> Self -> VCE_stateFunction -> [Speedometer] [ ]
[X] 1 [0] onActivate -> Self -> VCE_callFunction -> [Speedometer] [ ]
[X] 2 [10] onVariableFunction -> Self -> VCE_callFunction -> [Speedometer] [ ]
[X] 3 [0] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelX] set [<var:player:velx>]
[X] 4 [0] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelY] set [<var:player:vely>]
[X] 5 [0] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelZ] set [<var:player:velz>]
[X] 6 [1] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelX] power [2]
[X] 7 [1] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelY] power [2]
[X] 8 [1] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelZ] power [2]
[X] 9 [2] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelX] add [<var:brick:VelY>]
[X] 10 [2] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelX] add [<var:brick:VelZ>]
[X] 11 [2] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelX] squareRoot [2]
[X] 12 [3] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [Speed] set [<var:brick:VelX>]
[X] 13 [4] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [IntV] set [<var:brick:Speed>]
[ ] 14 [4] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [FinalV] set [<var:brick:Speed>]
[X] 15 [4] onVariableFunction -> Self -> toggleEventEnabled -> [13 14 16 17 18]
[ ] 16 [5] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [Accel] set [<var:brick:FinalV>]
[ ] 17 [5] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [Accel] subtract [<var:brick:IntV>]
[ ] 18 [5] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [Accel] divide [0.01]
[X] 19 [6] onVariableFunction -> Self -> VCE_ifVariable -> [Speed] > [<var:brick:maxSpeed>] [ ]
[X] 20 [6] onVariableTrue -> Self > VCE_modVariable {Brick} -> [maxSpeed] set [<var:brick:speed>]
[X] 21 [7] onVariableFunction -> Client -> bottomPrint -> [<color:FFFF00>Speed<color:FFFFFF>: <var:brick:speed> <color:666666> | <color:FFFF00>Acceleration<color:FFFFFF>: <var:brick:Accel> <color:666666> | <color:FFFF00>Max Speed<color:FFFFFF>: <var:brick:maxSpeed>] [3]


For just Speed, do this:


[X] 0 [0] onActivate -> Self -> VCE_stateFunction -> [Speedometer] [ ]
[X] 1 [0] onActivate -> Self -> VCE_callFunction -> [Speedometer] [ ]
[X] 2 [5] onVariableFunction -> Self -> VCE_callFunction -> [Speedometer] [ ]
[X] 3 [0] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelX] set [<var:player:velx>]
[X] 4 [0] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelY] set [<var:player:vely>]
[X] 5 [0] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelZ] set [<var:player:velz>]
[X] 6 [1] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelX] power [2]
[X] 7 [1] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelY] power [2]
[X] 8 [1] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelZ] power [2]
[X] 9 [2] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelX] add [<var:brick:VelY>]
[X] 10 [2] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelX] add [<var:brick:VelZ>]
[X] 11 [2] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [VelX] squareRoot [2]
[X] 12 [3] onVariableFunction -> Self -> VCE_modVariable {Brick} -> [Speed] set [<var:brick:VelX>]
[X] 13 [4] onVariableFunction -> Client -> bottomPrint -> [<color:FFFF00>Speed<color:FFFFFF>: <var:brick:speed>] [3]
« Last Edit: March 30, 2010, 11:30:16 PM by Deathwishez »