Jump to content

Cigs4

Member
  • Content Count

    57
  • Joined

  • Last visited

  • Medals

Everything posted by Cigs4

  1. Thanks a LOT, pierremgi !! this player thing is always tricky for me.
  2. Hello gentlemen, I hope you are having a good day. I have a simple piece of code that I can't get to work on a dedicated server. Could you please point out to me what's wrong? { while {true} do { if ( vehicle player == truk1 OR currentWeapon player == "" ) then { {_x setCaptive true} forEach units (group player) } else { {_x setCaptive false} forEach units (group player); break; }; }; sleep 3; }; As you can see, the idea is that, if a player is inside the vehicle or with the weapon on his back, he is in captive condition, if he decides to use the weapon, the loop breaks and he is no longer captive. That would be it. In fact, it works in the eden editor but not in the dedicated server. I'm running it via trigger, by the way. I don't have much knowledge of scripting, so that's why I'm asking for your help. Thank you very much in advance.
  3. Hello Arma gurus! I have a question regarding ACE. I would like to put an action on a gate via eden editor. This action should appear in the ace interaction exactly where the lock on the gate is. For some reason unknown to me, the interaction appears in the center of the gate and not in the lock. Here's the code I'm using: _action = ["actlock","Lockpick","",{Vrbpick = TRUE; publicVariable "Vrbpick"},{true},{},[], "door_handle_1", 5] call ace_interact_menu_fnc_createAction; [gate1, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject; Any help I would really apreciatte.
  4. cidkiron, that information is gold! Thanks a lot!
  5. Hello! I'm having difficulty using the mod AirFell's Keypad. There isn't much explanation on how to do things, but I believe it's very basic for those who have knowledge, which isn't my case. Anyway, what I would like to do is that when I type the code 3x wrong on the keypad, it runs a script. In init you can choose the code, like this: if (IsServer) then {code = "123321";publicVariable 'code';}; And if you have a trigger condition: (code = OutputText), it gives it as the correct code and executes it. Everything OK so far, but I want to execute this trigger when the code is entered 3 times wrong. I don't know if I managed to explain it correctly, but this is the mod: http:// https://steamcommunity.com/sharedfiles/filedetails/?id=384197619&searchtext=AirFell's+Keypad If anyone could help me, I would greatly appreciate it. Thanks!
  6. Thanks a LOT, Rouglee! It was exactly what I was looking for. Sorry for the delay in answer, I had even given up, but now I'm going to bring hell on some missions. 😁 Take care!
  7. Hello, I need help please. I'm trying to move some civilians from their positions to the same location and then return them to their original positions. They are all in different positions at the start. I know how to make them go to the first position, but I have no idea how to get them back to their original position. It's for a dedicated server. Any help would be greatly appreciated.
  8. Thank you guys! I got help from Charlie at SML Scripting & Moding and Prisoner and LeonZ at Arma 3 Scripting & Goodies. Prisoner is the author of the script I'm going to share here, in case anyone else needs something similar. 0 = []spawn { private _civs = units civilian; private _newPos = getPosATL newpos; { private _unit = _x; private _oldPosition = getPosATL _unit; _unit setVariable ["TAG_oldPosition",_oldPosition]; _unit forceWalk true; _unit commandMove _newPos; } forEach _civs; sleep 20; { private _unit = _x; private _orginalPosition = _unit getVariable "TAG_oldPosition"; _unit forceWalk true; _unit commandMove _orginalPosition; } forEach _civs; }; Thanks again! This community is awesome. Cheers!
  9. Thanks, JCataclisma. I'll try that.
  10. Thank you very much, gentlemen. As always, your help is invaluable. I did exactly that, I chose a small object, I placed it exactly in the lock of the gate (inside it, so it's out of sight), I used the bis_fnc_attachToRelative, to keep it in place and voilá, action available. Thanks again!
  11. Apologies for the delay. This is the classname: "Land_PipeFence_03_m_gate_r_F" Thanks!
  12. Thank you very much, Harzach! But I was wondering if it's possible to use any code to remove the action, the issue is not about locking the door. The code above does it, but remove the action from all doors in the building. Thanks again! 👍
  13. Sorry to bring this old post back, but I would like to know if it is possible to use what pierremgi posted above in a house with several doors, but removing the command for only one of those doors. Thanks a lot.
  14. Hello! I'm stuck for a few days on this. The idea would be that, as soon as a trigger is activated, a mortar will start shooting at the players. 0 = []spawn { while {alive gun_1G} do { sleep 15; _ammo = getArtilleryAmmo [gun_1] select 0; _tgt = player getRelPos [50,30]; [gun_1,[_tgt,_ammo,1]] remoteExecCall ["doArtilleryFire"];}; }; The code is in a trigger with Activation BLUEFOR, DETECTED BY OPFOR. It's a dedicated MP environment. The trigger works, but gives this error: "Error Undefined variable in expression: _ammo". I don't know how to fix this, I searched and didn't find a solution. Would anyone know how to help me, please?? Thanks in advance.
  15. Many thanks to both of you for your help. Larrow, actually after doing what you suggested, I saw that the mortar returned nil for ammo. I never suspected it might be out of ammo, in fact I believed it had infinite ammo. One more thing learned. Thanks again, gentlemen.
  16. Thanks for the prompt reply, gc8. I found that the problem is related to a mod and not the game or something I did wrong. The cTab mod follows the order of connection on the server and not the order of the slots, so they all appear with the wrong number when you follow the movement through cTab. I'll have to figure out how to fix this in cTab, if that's possible. Thanks again!
  17. Hello, I hope you guys can help me, please. I created a group with BIS_fnc_dynamicGroups. It works, but I wanted to go one step further. Each member of my group has a number, so I would like the members to be in numerical order in the group, regardless of the order they enter the server. The question is whether it would be possible to do this. Any help would be greatly appreciated. Thanks!
  18. Cigs4

    enableSimulationGlobal on Ded-server

    Hello! I'm no expert, but I think it's easier if you do it via script, creating and deleting mines accordingly.
  19. Hello, guys! Could someone please tell me what is wrong with this script? It doesn't work and I have no idea what could be wrong. It's a script to be used on a dedicated server, I'm running it via initServer. Any help will be greatly appreciated. Thanks. sleep 5; if (side _x == WEST) then { { removeVest _x; removeBackpack _x; removeHeadgear _x; _x addVest "rhs_6sh92"; _x addHeadgear "rhsgref_helmet_pasgt_erdl"; _x unlinkItem "ItemRadio"; _x Skill 0.65; }forEach allUnits; };
  20. Cigs4

    "side" problem

    Thanks a lot, guys! Much appreciated. 👍
  21. Thanks a lot for the help, guys! I could never do this alone, for sure. Living and learning... that's my thruth in Arma. Thanks again!
  22. Hello! I'm trying to make a script that adds an intel item to the AI enemies loadout, randomly. It would be several different intel items in different AI's, both randomly. I did something like this, but it didn't work. I am very grateful for any help. I'm a noob in scripting, unfortunately. Thanks. private ["_intelItems"]; _intelItems = ["Item_MobilePhone","Item_SmartPhone","Item_FlashDisk","Item_PropCamera_lxWS","Item_SecretDocuments","Item_FileTopSecret","Item_SecretFiles","Item_Files","Item_Laptop_Unfolded","Item_Laptop_closed","Item_ItemMap","Item_SmartPhone","Item_NetworkStructure","Item_Wallet_traitor"]; if (side _x == EAST) then { _x select (random (count _x)) additem (_intelItems call BIS_fnc_selectRandom); }forEach allUnits;
  23. Hello, I need some help with some coding, please. I placed a machine gun attached to the side of a vehicle for fire support purposes. So I want to be able to take that weapon from the vehicle, use it, and put it back in the same place. And I want the gun's magazine saved as is. It's like saving an inventory (for a weapon instead of a player). I've been searching for a few hours and I haven't found any code that can save the magazine or put the gun back on the side of the vehicle. Any help would be greatly appreciated. Thanks!
×