Jump to content
Sign in to follow this  

Recommended Posts

Hi,

 

I'm pretty sure, that it was in arma2, where you could issue a Command from a commaning menu and then the camera would fly above the player and you could move the camera with your mouse. Anybody got an idea on how to do this? Couldn't find anything in the wiki unfortionately.

Share this post


Link to post
Share on other sites

I don't know about a command menu doing that but maybe g cam

Share this post


Link to post
Share on other sites

For anybody, who is also interested in this - This is how i am doing it at the Moment:

 

private ["_handle","_hund","_pfeil"];
mm_tmpHandle = _this select 3;

//_handle setFSMVariable ["_command","move","_spieler"];

pfeil = createVehicle ["Sign_arrow_down_large_EP1", getPosASL mm_playerDoggie, [], 0, "CAN_COLLIDE"];
pfeil setObjectTexture [0, "#(argb,8,8,3)color(0,0.8,0,1)"];

mm_cleanup = {
	(findDisplay 46) displayRemoveEventHandler ["KeyDown", mm_eh_02];
	(findDisplay 46) displayRemoveEventHandler ["KeyDown", mm_eh_04];
	(findDisplay 46) displayRemoveEventHandler ["KeyDown", mm_eh_06];
	(findDisplay 46) displayRemoveEventHandler ["KeyDown", mm_eh_08];
	(findDisplay 46) displayRemoveEventHandler ["KeyDown", mm_eh_lk];
	(findDisplay 46) displayRemoveEventHandler ["KeyDown", mm_eh_rk];
	mm_02 = nil;
	mm_04 = nil;
	mm_06 = nil;
	mm_08 = nil;
	mm_lk = nil;
	mm_rk = nil;
	mm_eh_02 = nil;
	mm_eh_04 = nil;
	mm_eh_06 = nil;
	mm_eh_08 = nil;
	mm_eh_lk = nil;
	mm_eh_rk = nil;
	mm_tmpHandle = nil;
};

mm_02 = {
	pfeil setPosATL [(getPosASL pfeil select 0),((getPosASL pfeil select 1) - 1),0];
};

mm_04 = {
	pfeil setPosATL [((getPosASL pfeil select 0) - 1),(getPosASL pfeil select 1),0];
};

mm_06 = {
	pfeil setPosATL [((getPosASL pfeil select 0) + 1),(getPosASL pfeil select 1),0];
};

mm_08 = {
	pfeil setPosATL [(getPosASL pfeil select 0),((getPosASL pfeil select 1) + 1),0];
};

mm_lk = {
	mm_tmpHandle setFSMVariable ["_command","move"];
	mm_tmpHandle setFSMVariable ["_moveComPos",getPosASL pfeil];
	deleteVehicle pfeil;
	pfeil = nil;
	mm_camera cameraEffect ["Terminate", "Back"];
	camDestroy mm_camera;
	[] call mm_cleanup;
};

mm_rk = {
	deleteVehicle pfeil;
	pfeil = nil;
	mm_camera cameraEffect ["Terminate", "Back"];
	camDestroy mm_camera;
	[] call mm_cleanup;
};

mm_eh_02 = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 0x50) then {[] call mm_02;};"];
mm_eh_04 = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 0x4B) then {[] call mm_04;};"];
mm_eh_06 = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 0x4D) then {[] call mm_06;};"];
mm_eh_08 = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 0x48) then {[] call mm_08;};"];
mm_eh_lk = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 0x4E) then {[] call mm_lk;};"];
mm_eh_rk = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 0x9C) then {[] call mm_rk;};"];

mm_camera = "camera" camCreate (pfeil modelToWorld [0,-6,15]);
mm_camera camSetTarget pfeil;
mm_camera cameraEffect ["External", "RIGHT BACK"];
mm_camera camCommit 0;

while {!isNil "pfeil"} do {
	player setDamage 0;
	
	mm_camera camSetRelPos [0, -6, 15];
	mm_camera camCommit 0;
};

 

You obviously have to remove, what you don`t need and it`s not the nicest thing to have, but it works.

Share this post


Link to post
Share on other sites

Hi,

 

I'm pretty sure, that it was in arma2, where you could issue a Command from a commaning menu and then the camera would fly above the player and you could move the camera with your mouse. Anybody got an idea on how to do this? Couldn't find anything in the wiki unfortionately.

 

Maybe you mean the Commander View camera?  Numpad period [ . ] is the default.  But the camera stays with you (the Commander).

Share this post


Link to post
Share on other sites

Maybe you mean the Commander View camera?  Numpad period [ . ] is the default.  But the camera stays with you (the Commander).

Thank you so much, that`s amazing and even better then what i had in memory. Is there any way of adding this to a script with a custom Commaning Menu?

Share this post


Link to post
Share on other sites

Control + Space keys for High Commander Options. And hit [.] for Cammand View.

 

 

And inside a script...? :

WaitUntil{!isNull player}; waituntil {alive player};
sleep 0.2;

_player = _this select 0; // player Or Name.

createcenter sidelogic;
_group = creategroup sidelogic;

Commander = _group createunit ["HighCommand",position _player,[],0,"none"];
Sub = _group createunit ["HighCommandSubordinate",position _player,[],0,"none"];
Sub synchronizeObjectsAdd [Commander];
Commander synchronizeObjectsAdd [_player];

HCShowBar true; // Show High Commander Action Bar since the begining.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×