Jump to content

gc8

Member
  • Content count

    1023
  • Joined

  • Last visited

  • Medals

Community Reputation

191 Excellent

1 Follower

About gc8

  • Rank
    Master Gunnery Sergeant

Contact Methods

  • Website URL
    armagc.blogspot.com
  • Steam url id
    gencoder

Profile Information

  • Gender
    Male
  1. [SP/MP] [RPG] Fall of men

    New release! What's new: Caravans travel between towns (There's trader who can trade with you) Weather parameters Bug fixes Btw if anyone has any ideas on features for this mission please feel free to say
  2. @Larpushka I added some comments to my code. Hope that clears it a bit
  3. Hi @code34 I'm trying out the demo but I don't know what to do. is there instructions? thx!
  4. @Larpushka Here's you the basic function that locks the doors in building and allows you to unlock the doors with action menu: lockDoors = { params ["_posObj"]; if(typename _posObj == "OBJECT") then // Is passed parameter an object? { _posObj = getpos _posObj; }; _bldg = nearestBuilding _posObj; // Get the building closest to the parameter object/location _num = getNumber (configfile >> "CfgVehicles" >> typeOf _bldg >> "numberOfDoors"); // Need to get number of doors in the building diag_log format["Locking doors %1", _num]; for "_i" from 1 to _num do // loop through all the doors in the building { _bldg setVariable [format["bis_disabled_Door_%1",_i], 1, false]; // lock the door _sel = format["Door_%1", _i]; // The door selection for addaction command // Add action user can select from the scroll menu _aid = _bldg addAction ["<t color='#ffbf00'>Unlock door</t>", { params["_bldg","_caller","_actId","_doorIndex"]; hint "Opening door"; _bldg setVariable [format["bis_disabled_Door_%1",_doorIndex], 0, false]; // Unlock the door }, _i,1.5,true,true,"","true",3,false,_sel]; }; }; In there, inside the addaction's condition field you can put your key check. So that the action only appears if you have the key... This function is SP btw you need to call the function by giving it either object or position as parameter Example usage: myBuilding call lockDoors; Put game logic called "myBuilding" near the building in editor that you want locked, then call that function from init.sqf
  5. @Larpushka Sorry I don't understand how you want the key to be? An item in your inventory, or something else? If you give more details we can help you better.
  6. setFlagTexture issues

    @madrussian Would this function help you get the mission root? getMissionPath = { _astr = str getMissionConfig "author"; _remove = "mission.sqm/ScenarioData/author"; if(_astr find "description.ext" >= 0) then { _remove = "description.ext/author"; }; _ret = _astr select [0, count _astr - (count _remove) ]; _ret };
  7. Use addaction to add the scroll menu action on doors. You don't really need a key just some variable that tells player has the key and can use the action. Check out this thread how to do it:
  8. The door "lock" can be changed via this variable: building setVariable["bis_disabled_Door_1",1,true]; Then you need to use addAction with selection to put the action on the door you want. That should get you started...
  9. Arrays apply

    _arr = [["launch_NLAW_F","arifle_MX_F","arifle_MX_SW_F","Laserdesignator"],[1,2,1,1]]; _arr1 = _arr select 0; _arr2 = _arr select 1; _res = []; { _res pushBack [_x,_arr2 select _forEachIndex]; } forEach _arr1; sleep 0.1; player sideChat (str _res);
  10. @Prejudice instead of _Object hideObject true; try _nic = [nil, _Object, "per", rHideObject, true ] call RE; in the same place if it works on SP it should work on MP too...
  11. Use https://community.bistudio.com/wiki/hideObjectGlobal Oops it maybe not available on arma 2, not sure
  12. I was just using say. it plays the sound but lips don't move
×