Jump to content

sarogahtyp

Member
  • Content Count

    2494
  • Joined

  • Last visited

  • Medals

Everything posted by sarogahtyp

  1. I dont know what the problem is, I can't see a mistake but you can try to add this at the very beginning of the code: waitUntil {sleep 1; not isNull player }; if this is not helping then just delete the line after testing.
  2. sarogahtyp

    Deleting Vehicle Crew

    I doubt that this line hint _unitName; // return "heli1" gives you the hint of what this line did before unitName = vehicleVarName (thisList select 0); you mix global and local variables also for deleting you use heli1 and not the object from thisList. and it won't work is not the thing one can work with. its just too specific... maybe this works: private dummy = { deleteVehicleCrew _x; deleteVehicle _x; } count ( thisList apply {vehicleVarName _x} );
  3. https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Multiplayer_Event_Handlers ... but there is no call for mst_fnc_ppe in your EH ...
  4. No, he just checks if an independent is near and deletes the editing area if that is the case. but there is an ID conflict which I did not see... EDIT: conflict fixed now
  5. I did not check every command of your script in biki because this is your own job but something like this should do what you want. Put it in onPlayerRespawn.sqf and read those event scripts description in biki. private _zeus_curator = objNull; private "_areaID"; switch (player) do { case BLUFOR_Player001: { _zeus_curator = ZeusBLUFOR001_Curator; _areaID = 1; }; case BLUFOR_Player002: { _zeus_curator = ZeusBLUFOR002_Curator; _areaID = 2; }; case BLUFOR_Player003: { _zeus_curator = ZeusBLUFOR003_Curator; _areaID = 3; }; case BLUFOR_Player004: { _zeus_curator = ZeusBLUFOR004_Curator; _areaID = 4; }; }; if (isNull _zeus_curator) exitWith {}; while { alive player } do { if ( { _x distance2D player < 40 && side _x isEqualTo independent } count allUnits > 0 ) then { _zeus_curator removeCuratorEditingArea _areaID; } else { _zeus_curator addCuratorEditingArea [ _areaID, (position player), 40 ]; }; sleep 0.5; };
  6. sarogahtyp

    removing countermeasures

    https://community.bistudio.com/wiki/removeMagazinesTurret https://community.bistudio.com/wiki/magazinesAllTurrets
  7. those random getpos has no relation to the vehicle spawn. its his way to teleport nato players to starting area after the round ended. At least is that what I guess here 🙂
  8. Hey @LSValmont, am I allowed to create a version of your script which uses armas function library? I m willing to hand it over to you if its done and you can think about what you want to do with it. The reason is that I personally don't like to execute scripts which are not precompiled by function library.
  9. _Pos = [11362,11442]; { _x setpos [11682 + random [-5,0,5],11917 + random [-5,0,5],1] } forEach NatoUnits; same as private _base_pos = [11682, 11917, 0]; private "_rnd_pos"; { _rnd_pos = _base_pos getPos [ (random 5), (random 360) ]; _x setPos _rnd_pos; } forEach NatoUnits; but faster and better readable, at least for me. ok, the speed advantage is negligible. I thought it would be more.
  10. you can do this with a script which is executed one time by initServer.sqf All other things you mentioned have to be handled by your script...
  11. sarogahtyp

    What am I doing Wrong?

    try the code I put in the spoiler of my last post ... and please use code block in forum posts. Again you can find the code block icon on the top of the post you are currently editing and its icon is: <>
  12. initServer.sqf should be the right place for it.
  13. post a .rpt file of those connection try pls. https://community.bistudio.com/wiki/Crash_Files#Location
  14. if you run a script on one machine which spawns exactly one ifrit then you ll have one ifrit spawned. if you execute the same script on all connected machines then you have as many ifrits as many machines are connected... thats what @pierremgi is talking about and what has to be in mind if you want to create scripts for multiplayer. there is one more important link you should use: https://community.bistudio.com/wiki/Event_Scripts these are one tool for controling where/when a script gets executed.
  15. sarogahtyp

    What am I doing Wrong?

    because I am sometimes a friendly person: _unit = player; _Crate = PlayerStorage; _playerweap = primaryWeapon player; _cash = Daddies; _cost = 120; Ak-12 = ["arifle_AK12_F"]; // square bracket never gets closed buttonSetAction [ 1601, { // assuming _playerweap shall be the same as playerweap - you are checking if player // has the weapon which he has in his hand already. Why? // playerweap is global here but some lines above you declared it local. Is this intended? if ( player hasWeapon "playerweap" ) then { _unit action ["PutWeapon", _Crate, primaryWeapon _unit]; Hint "Weapon Stored"; } //then without if will never work, must be else I guess then { if (_cash >= _cost) then { MoneySystem = MoneySystem - 120; player addweapon "arifle_AK12_F"; } else { Hint "Not Enough Dosh"; // last closing bracket of if then else statement needs a semicolon } }; //missing a curly bracket to close the code block and a square bracket to close your button action
  16. sarogahtyp

    What am I doing Wrong?

    you did not get it. An example for readable code: the important things of the biki entry I linked prior:
  17. sarogahtyp

    What am I doing Wrong?

    I guess first thing you did wrong is to post such piece of ... and ask for help for it. for readability (this is important for other people to read your code) : 1. use a code block in forum to post code, plz - you can find it in the icon bar on top and it has this icon: <> 2. indent lines after curly brackets, plz 3. use spaces between brackets and other things. Maybe others are but I m not willing to help before you did the formal basics... and I bet you ll find some mistakes yourself during that EDIT: Read this! https://community.bistudio.com/wiki/Code_Best_Practices#Best_practices EDIT2: Perhaps I was a little too harsh but if you didn't know 'bout above things then you know now,
  18. where in that mission file?
  19. sarogahtyp

    How to spawn Big Smoke Pillars?

    it has to be broadcasted to each client in multiplayer. dedicated Server does not need to execute it, machines with display have to. JIP is also a thing here.
  20. Hey @ZaellixA now I ll do a late reply 🙂 your first suggestion about lazy evaluation is a double-edged sword. The problem is that IF the part in curly brackets gets evaluated then it is slower than it would be without lazy evaluation. Therefore one has to think about how often that could happen and if there is a real performance gain if one uses LE or if the whole thing gets slower with LE because the curly brackets are evaluated too often... detailed comparison; true || {false} || {false} 0.0009 ms false || {true} || {false} 0.0014 ms false || {false} || {true} 0.0017 ms true || false || false 0.0012 ms false || true || false 0.0012 ms false || false || true 0.0012 ms false && {true} && {true} 0.001 ms true && {false} && {true} 0.0014 ms true && {true} && {false} 0.0018 ms what u can see is that without LE the execution time is always same. With LE you have only one case where it is faster as without LE. Therefore you have to care that your script triggers the best case mostly. or you just do it without LE...
  21. sarogahtyp

    wayPoints issue

    you don't need BIS_fnc_findSafePos to get a position in a random radius. getPos does the job much faster: _position = getMarkerPos "Marker1"; _radius = 100; _rand_pos = _position getPos [ ( random _radius ), ( random 360 ) ]; _wp = _group addWayPoint [ _rand_pos, 0, 1 ];
×