| Blockland Forums > Suggestions & Requests |
| Speedometer |
| << < (3/3) |
| Deathwishez:
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] |
| duke 838:
--- Quote from: Deathwishez on March 30, 2010, 10:54:13 PM ---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] --- End quote --- What? |
| Max4344:
--- Quote from: Deathwishez on March 30, 2010, 10:54:13 PM ---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] --- End quote --- What? you know what just put the events as a .txt file and put a readme on how to do it |
| Doomonkey:
You can make one by spamming console commands. Echo(Getcontrolobjectvelocity()); Maybe. |
| Deathwishez:
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] |
| Navigation |
| Message Index |
| Previous page |