Created
October 14, 2018 21:38
-
-
Save BaerMitUmlaut/b523a4d9cfde7344274a61c2dee85579 to your computer and use it in GitHub Desktop.
In game live FPS graph with ropes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
player setPos [15, 15, 0]; | |
meme_history = []; | |
meme_indicators = []; | |
meme_ropes = []; | |
comment "x axis"; | |
for "_i" from 0 to 9 do { | |
private _b = "Sign_Sphere100cm_F" createVehicle [0, 0, 0]; | |
_b setPosATL [10, 10 + _i * 2, 0]; | |
}; | |
comment "y axis"; | |
for "_i" from 0 to 6 do { | |
private _b = "Sign_Sphere100cm_F" createVehicle [0, 0, 0]; | |
_b setPosATL [10, 10, _i * 2]; | |
}; | |
comment "x grid"; | |
for "_i" from 0 to 6 do { | |
private _u1 = "B_UAV_01_F" createVehicle [0, 0, 0]; | |
_u1 hideObject true; | |
private _u2 = "B_UAV_01_F" createVehicle [0, 0, 0]; | |
_u2 hideObject true; | |
_u1 setPosATL [10, 10, _i * 2]; | |
_u2 setPosATL [10, 28, _i * 2]; | |
ropeCreate [ | |
_u1, | |
[0, 0, 0], | |
_u2, | |
[0, 0, 0], | |
18 | |
]; | |
}; | |
comment "y grid"; | |
for "_i" from 0 to 9 do { | |
private _u1 = "B_UAV_01_F" createVehicle [0, 0, 0]; | |
_u1 hideObject true; | |
private _u2 = "B_UAV_01_F" createVehicle [0, 0, 0]; | |
_u2 hideObject true; | |
_u1 setPosATL [10, 10 + _i * 2, 0]; | |
_u2 setPosATL [10, 10 + _i * 2, 12]; | |
ropeCreate [ | |
_u1, | |
[0, 0, 0], | |
_u2, | |
[0, 0, 0], | |
12 | |
]; | |
}; | |
comment "indicators"; | |
for "_i" from 1 to 10 do { | |
private _u = "B_UAV_01_F" createVehicle [0, 0, 0]; | |
private _y = "Sign_Sphere10cm_Geometry_F" createVehicle [0, 0, 0]; | |
_y attachTo [_u, [0, 0, 0]]; | |
_u hideObject true; | |
_u setPosATL [10, 9 + _i * 2, 0]; | |
meme_indicators pushBack _u; | |
meme_history pushBack 0; | |
}; | |
comment "pfh"; | |
[{ | |
meme_history deleteAt 0; | |
meme_history pushBack (diag_fps / 5); | |
{ deleteVehicle _x } forEach meme_ropes; | |
for "_i" from 0 to 10 - 1 do { | |
meme_indicators#_i setPosATL [10, 10 + _i * 2, meme_history#_i]; | |
}; | |
for "_i" from 0 to 10 - 2 do { | |
meme_ropes pushBack ropeCreate [ | |
meme_indicators#_i, | |
[0, 0, 0], | |
meme_indicators#(_i + 1), | |
[0, 0, 0], | |
(meme_indicators#_i) distance (meme_indicators#(_i + 1)) | |
]; | |
}; | |
}, 1, []] call CBA_fnc_addPerFrameHandler; | |
comment "fps brake"; | |
[{ | |
private _fps = random [0, 40, 60]; | |
private _start = diag_tickTime; | |
private _max = _start + 1 / _fps; | |
private _a = { | |
if (diag_tickTime < _max) then { call _a }; | |
}; | |
call _a; | |
}, 0, []] call CBA_fnc_addPerFrameHandler; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the fuck