Jump to content
Sign in to follow this  
Charles Darwin

Change Map Image on existing map?

Recommended Posts

In ArmA 1 days I played on a mission where when a player opened the map it showed a custom image instead of the standard ArmA map I am sure its possible in ArmA 2 just not sure how or what the name of that mission was to find out how he did it

Share this post


Link to post
Share on other sites

Block the actionkey for the map with a key eventhandler and show a custom picture resource or a dialog instead.

Xeno

Share this post


Link to post
Share on other sites

So I popped open the ACE pbo that controls their map replacement and lost feeling on my left side, so stopped trying to understand it. :)

Share this post


Link to post
Share on other sites

This is not my area at all I have only dabbled in it. Here is some stuff for you to digest and an example of something similar from an addon called "Mouse Wheel View Distance".

AddEventHandler

User_Interface_Event_Handlers

DIK_KeyCodes

This is not mine but this is an example of a displayEventHandler.

This is not my code! I am posting it as an example. It is from this addon.

All credit to tpw.

// Change viewdistance with mousewheel tpw 20110214

hintsilent "Mouse Wheel View Distance 1.02 Active";



mwvd_min = _this select 0; // minimum draw distance
mwvd_max = _this select 1; // maximum draw distance
mwvd_inc = _this select 2; // increment draw distance
mwvd_hint = false;

[] spawn {
while {mwvd_min > 0} do {
waituntil {mwvd_hint}; 
sleep 1; 
hintsilent "";
mwvd_hint = false;
};
};

(findDisplay 46) displayAddEventHandler ["keyDown", "_this call functionName_keyDown"];
functionName_keyDown = 
{
private["_ctrl","_alt"];
_ctrl = _this select 3;
_alt = _this select 4;
mwvd_ctrl_alt = false;
if (_ctrl && _alt) then { mwvd_ctrl_alt = true;};
mwvd_ctrl_alt;
};

(findDisplay 46) displayAddEventHandler ["keyup", "_this call functionName_keyup"];
functionName_keyup = 
{
mwvd_ctrl_alt = false;
mwvd_ctrl_alt;
};


(findDisplay 46) displayAddEventHandler ["MouseZChanged", "_this call functionName_mwheel"];
functionName_mwheel = 
{
private["_state"];
_state = _this select 1;
if (mwvd_ctrl_alt) then {
if (_state > 0) then {_vd = viewdistance; _vd = _vd + mwvd_inc; if (_vd > mwvd_max) then {_vd = mwvd_max};setviewdistance _vd; hintsilent format ["%1",_vd]; mwvd_hint = true;};
if (_state < 0) then {_vd = viewdistance; _vd = _vd - mwvd_inc; if (_vd < mwvd_min) then {_vd = mwvd_min}; setviewdistance _vd; hintsilent format ["%1",_vd]; mwvd_hint = true;};

};  
mwvd_ctrl_alt = false;
mwvd_ctrl_alt;    
};

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  

×