Skip to content

Instantly share code, notes, and snippets.

@X39
Created September 29, 2017 00:43
Show Gist options
  • Save X39/f51ef0790221adf8671588967c26b029 to your computer and use it in GitHub Desktop.
Save X39/f51ef0790221adf8671588967c26b029 to your computer and use it in GitHub Desktop.
show allmission objects
if (!isNil "eh") then {removeMissionEventHandler ["Draw3D", eh];};
eh = addMissionEventHandler["Draw3D", {
{
private _pos = position _x;
drawLine3D [[(_pos select 0) - 1, (_pos select 1) - 1, (_pos select 2) - 1], [(_pos select 0) - 1, (_pos select 1) + 1, (_pos select 2) - 1], [1, 0, 0, 1]];
drawLine3D [[(_pos select 0) - 1, (_pos select 1) - 1, (_pos select 2) - 1], [(_pos select 0) - 1, (_pos select 1) - 1, (_pos select 2) + 1], [1, 0, 0, 1]];
drawLine3D [[(_pos select 0) - 1, (_pos select 1) - 1, (_pos select 2) - 1], [(_pos select 0) + 1, (_pos select 1) - 1, (_pos select 2) - 1], [1, 0, 0, 1]];
drawLine3D [[(_pos select 0) + 1, (_pos select 1) + 1, (_pos select 2) + 1], [(_pos select 0) + 1, (_pos select 1) - 1, (_pos select 2) + 1], [1, 0, 0, 1]];
drawLine3D [[(_pos select 0) + 1, (_pos select 1) + 1, (_pos select 2) + 1], [(_pos select 0) - 1, (_pos select 1) + 1, (_pos select 2) + 1], [1, 0, 0, 1]];
drawLine3D [[(_pos select 0) + 1, (_pos select 1) + 1, (_pos select 2) + 1], [(_pos select 0) + 1, (_pos select 1) + 1, (_pos select 2) - 1], [1, 0, 0, 1]];
drawLine3D [[(_pos select 0) + 1, (_pos select 1) - 1, (_pos select 2) + 1], [(_pos select 0) + 1, (_pos select 1) + 1, (_pos select 2) - 1], [1, 0, 0, 1]];
drawLine3D [[(_pos select 0) - 1, (_pos select 1) + 1, (_pos select 2) - 1], [(_pos select 0) + 1, (_pos select 1) + 1, (_pos select 2) - 1], [1, 0, 0, 1]];
drawLine3D [[(_pos select 0) + 1, (_pos select 1) - 1, (_pos select 2) + 1], [(_pos select 0) - 1, (_pos select 1) - 1, (_pos select 2) + 1], [1, 0, 0, 1]];
drawLine3D [[(_pos select 0) - 1, (_pos select 1) + 1, (_pos select 2) + 1], [(_pos select 0) - 1, (_pos select 1) - 1, (_pos select 2) + 1], [1, 0, 0, 1]];
drawLine3D [[(_pos select 0) - 1, (_pos select 1) + 1, (_pos select 2) + 1], [(_pos select 0) - 1, (_pos select 1) + 1, (_pos select 2) - 1], [1, 0, 0, 1]];
drawLine3D [[(_pos select 0) + 1, (_pos select 1) - 1, (_pos select 2) - 1], [(_pos select 0) + 1, (_pos select 1) - 1, (_pos select 2) + 1], [1, 0, 0, 1]];
false
} count allMissionObjects "EmptyDetector";
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment