Jump to content

pierremgi

Member
  • Content Count

    7275
  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

4739 Excellent

About pierremgi

  • Rank
    Major

Profile Information

  • Location
    Tahiti

Recent Profile Visitors

14359 profile views

Single Status Update

See all updates by pierremgi

  1. Pierre I am kind of stuck trying to bind a key like maybe  shift+m  to my map I am trying to build.
    Reference code on page below. Do you have any suggestions or know of any code samples?

     

    I have been looking around for examples but have not found any. Kind of lost.

     

    1. Show previous comments  13 more
    2. pierremgi

      pierremgi

      There is no ; between "passed" and exitwith. And, probably, a copy paste bug which add an invisible character (weird forum bug). You should rewrite this line by hand.

    3. Antman2o1o

      Antman2o1o

      Ok did that now i get this error

      Shutbug2.jpg

       

      Code below

       

      [] spawn {
         waituntil {!isNull (findDisplay 46)};
         (findDisplay 46) displayAddEventHandler ["keyDown", "_this call your_keyFnc"];
         };

      your_keyFnc = compileFinal "
       _ctrl = _this #0;
       _dikCode = _this #1;
       _shift = _this #2;
       _ctrlKey = _this #3;
       _alt = _this #4;
       private _input = false;

       if (_shift && !_alt && !_ctrlKey) then {
         if (_dikCode == 50) then {
           call {
               if (isNil "passed") exitWith {
                  passed = TRUE;
                 ( [ 'myMiniMap' ] call BIS_fnc_rscLayer ) cutRsc [ 'myMap', 'PLAIN', 1, false ];
               };
               passed = nil;

               '' cutRsc [ 'myMap', 'PLAIN', 1, false ];
           };
         _input = true
         };
       };
       _input
      ";

    4. pierremgi

      pierremgi

      'passed' not "passed"

       

    5. Show next comments  6 more
×