Jump to content

MKD3

Member
  • Content Count

    147
  • Joined

  • Last visited

  • Medals

Everything posted by MKD3

  1. Ive never seen the description ext used for such things, seems very strange. Much better off using something in initplayerlocal.sqf for simplicity (not tested obviously from the classnames) If you're making a mod, why not just config your own units in using the BIS base classes? Everything about that seems slightly backwards to me, but thats me. if (typeof player == "Classname here") then { removeallweapons player; removevest player; removebackpack player; removeuniform player; player addweapon "lazor"; Player addweapon "smaller lazor"; player addbackpack "something"; player addvest "something else"; player adduniform "Prom dress"; player addMagazine ["some mags",10]; player addMagazine ["some frags",3]; for "_i" from 1 to 5 do { player additem "turkey dinner"; }; };
  2. Yup looks like you are missing BIS pbos, without some SQM fenangling you might be boned
  3. Wait, do you want to convert this code to work on unit names instead of on a player?
  4. Just for your benefit. In 3DEN you can save "compositions" or what I call, groups of shit. You create them, select what you want and then save them for later use. Very time saving, and you should in theory be able to save types of units.
  5. Hi, they would need to be config units. That means they must be an addon, properly configured, and then run. If youre not very confident with scripting, I dont think you would be able to do this without a fair amount of learning and time as it its not only scripting involved, perhaps try using the composition saving feature.
  6. Erh. not sure what that is. Use https://community.bistudio.com/wiki/BIS_fnc_MPthat. Youre meant to use remoteexec but I cant remember how to use it with an SQF file so for now that will do.
  7. Wont work because of locality. Basically, the code needs to be executed on every client and a trigger only executes it on the server. You need to find a way (Debug) to execute the script locally on every machine.
  8. MKD3

    Join your old Group

    If 100% of the players/units leave the group then yeah it will be lost. What relies on the groupID? cos you could probably do it other ways. Why not just save the leader of the old group and then rejoin on whatever group he is in now.
  9. MKD3

    Changing gear script (multiplayer)

    In server locality it executes once. In client locality it will execute once on every machine, so for every connected player. So every player will get their gear at the moment they are below 2m ATL, totally independantly of everything else including other players. Sarogahtyp has a solution for unit specific gear also. It will work. Locality can be hard to wrap your head around, check out this http://killzonekid.com/arma-scripting-tutorials-locality/ Edit: Also it is good practice to use a sleep in waituntil code like above, I just forgot to do it.
  10. MKD3

    Changing gear script (multiplayer)

    That wont address the locality issues you're going to get using triggers. Have you tested this on a dedicated server? because player gear is local and triggers execute on server. You're better of using what I posted as it will not only execute clientside, it will also work for any player that joins and any amount of players. (assuming I did it correctly, it was a quick fix)
  11. MKD3

    Changing gear script (multiplayer)

    So youre executing a individual script for every player? Strange. Yes its a locality problem. If it were me, I would entirely skip the trigger and simplify the code (look into for loops so you can shorten code like this a lot): Put this straight into your mission folder root. initplayerlocal.sqf waituntil {getposATL player select 2 < 2}; player addBackpack "rhsusf_assault_eagleaiii_ocp"; player addItemToBackPack "rhs_mag_an_m8hc"; player addItemToBackPack "rhs_mag_an_m8hc"; player addItemToBackPack "rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Orange"; player addItemToBackPack "rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Orange"; player addItemToBackPack "rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Orange"; player addItemToBackPack "rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Orange"; player addItemToBackPack "rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Orange"; player addItemToBackPack "rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Orange"; player addItemToBackPack "rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Orange"; player addItemToBackPack "rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Orange"; player addItemToBackPack "rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Orange"; player addItemToBackPack "rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Orange"; player addItemToBackPack "rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Orange"; player addItemToBackPack "rhs_mag_M441_HE"; player addItemToBackPack "rhs_mag_M441_HE"; player addItemToBackPack "rhs_mag_M441_HE"; player addItemToBackPack "rhs_mag_M441_HE"; player addItemToBackPack "rhs_mag_M441_HE"; player addItemToBackPack "rhs_mag_M441_HE"; player addItemToBackPack "rhs_mag_M441_HE"; player addItemToBackPack "rhs_mag_M441_HE"; player addItemToBackPack "rhs_mag_M441_HE"; player addItemToBackPack "ACE_elasticBandage"; player addItemToBackPack "ACE_elasticBandage"; player addItemToBackPack "ACE_elasticBandage"; player addItemToBackPack "ACE_quikclot"; player addItemToBackPack "ACE_quikclot"; player addItemToBackPack "ACE_quikclot"; player addItemToBackPack "ACE_epinephrine"; player addItemToBackPack "ACE_MapTools"; player addItemToBackPack "ACE_morphine"; player addItemToBackPack "ACE_morphine"; player addItemToBackPack "ACE_morphine"; player addItemToBackPack "ACE_packingBandage"; player addItemToBackPack "ACE_packingBandage"; player addItemToBackPack "ACE_packingBandage"; player addItemToBackPack "ACE_packingBandage"; player addItemToBackPack "ACE_packingBandage"; player addItemToBackPack "ACE_packingBandage"; player addItemToBackPack "ACE_packingBandage"; player addItemToBackPack "ACE_packingBandage"; player addItemToBackPack "ACE_packingBandage"; player addItemToBackPack "ACE_packingBandage"; player addItemToBackPack "ACE_tourniquet"; };
  12. _unit addEventHandler ["killed", "null=[] execVM ""scripts\killed.sqf"""] Is used in the EOS instead of _unit addEventHandler ["killed", {nul = [_this select 0, _this select 1] execVM "scripts\killed.sqf"}]
  13. Are you using one or both of those above solutions? Cos the 2nd one is missing the parameters to send to killed.sqf
  14. Mind posting how you solved it for others @revv?
  15. I have edited it because I totally glazed over what you asked because I saw a few errors in many places sorry lol.
  16. { if (side _x == "EAST") then { _x addEventHandler ["Killed", { [_this select 0, _this select 1] execVM "killed.sqf"; }]; }; } foreach allunits; 5th edit: Suppose I should add an explanation. All that code does is get every unit, check its side and then apply the event handler. Foreach wont execute the code to find the units like you have tried, so you have to either get an array of every unit, or just use allUnits and filter them. Also, code in killed.sqf is wrong. Try this: *Note the use of brackets, that is necessary. Not tested Hope it helps. if ((isPlayer _killer) && (side _unit == "EAST")) then {CODE};
  17. In the init for the leader of the group you want in the helo use this: {_x moveincargo helo} foreach units group this; Will put each soldier in for the group you selected.
  18. First, Give units a getin waypoint, give the helicopter a load waypoint, syncronised them. That should work if the LHD isnt bugged (Which it probably is) 2nd is probably armas piss poor AI at it again. 3rd, you must create a patrol for a unit and then they will do it. use a few move waypoints, and make the last waypoint a cycle waypoint. That will create a loop the AI will patrol. My recommendation is slowing down and getting the basics down first. Good luck
  19. That was gonna be my solution to it cos I have a small addon that does exactly that, just wasnt sure, good work finding it.
  20. So youre trying to change the information shown on the GUI when you click on the list? or you want to click the list, then click a button to execute what is selected in the list?
  21. That wont work because its setting and then resetting the variable over and over again for each leader.And as profTounesol said it also wont work because a group always has a leader, regardless if the one you set is alive or not. If he doesnt exist, number 2 becomes the leader. Unfortunately, you need a specific global name for each leader as far as I can think without some pretty heavy scripting because you cant look for a group leader, you need to look for a specific unit. I would completely avoid using the unit and set a random chance of the group being deleted in code, randomgroups.sqf { //Select probability of existing _probability = random 99; //Define group _selectedGroup = _x; //Check side and whether it should exists, then delete if needed if ( (side _selectedGroup == "EAST") && (_probability > 50) ) then { {deletevehicle _x} foreach units _selectedGroup}; } foreach allgroups; Not tested.
  22. BIS_fnc_MP isnt the recommended way for calling over network. https://community.bistudio.com/wiki/remoteExecCall or https://community.bistudio.com/wiki/remoteExec is the new command to replace that function.
  23. Will test it now, thanks for the update ruPal! Edit: Tested, and 10x better, accurate out to 2.5km with the m252. Dunno if you changed much or I just messed up before but cheers anyway.
  24. Hi ruPal, just been testing this update and it seems the M252 range table is up to 200 mil out. I cant get a shot within 300m of a target at 1km range. Not sure why this is, but it looks like the M252 range table is identical to the mk6 which has always been innacurate.
×