Jump to content

RoryRothon

Member
  • Content Count

    56
  • Joined

  • Last visited

  • Medals

Everything posted by RoryRothon

  1. RoryRothon

    Global variable - how to?

    Maybe this instead of sleep? _timer = time + 2; waitUntil { time > _timer };
  2. RoryRothon

    Global variable - how to?

    Nevermind, i have sussed it, blonde moment over......
  3. Ive been messing around and for the life of me i cannot get this working lol My mission starts with all players split up. Once they find each other, they join the same group (Using ACE3). I want to run a check to see if all alive players are in the same group, and if so return a true value that i can use to fire the creation of a rendezvous point & trigger. Then i need to check that the whole group (of alive players in the same group) are within the trigger area to trigger mission complete.... Any advice would be greatly appreciated... Kind regards Rory
  4. I currently have this. It works fine on my local system under lan hosted session but when i upload it to my dedi, it does not.... Can someone see any mistakes ive made? And yes i have done the server check in my sqf :) { // Starting spawning RED units 0 = [] spawn { for '_i' from 0 to 999999 do { _islamicState = [ configfile >> "CfgGroups" >> "east" >> "LOP_ISTS_OPF" >> "Infantry" >> "LOP_ISTS_OPF_AT_section", configfile >> "CfgGroups" >> "east" >> "LOP_ISTS_OPF" >> "Infantry" >> "LOP_ISTS_OPF_Fireteam", configfile >> "CfgGroups" >> "east" >> "LOP_ISTS_OPF" >> "Infantry" >> "LOP_ISTS_OPF_InfSupTeam", configfile >> "CfgGroups" >> "east" >> "LOP_ISTS_OPF" >> "Infantry" >> "LOP_ISTS_OPF_Patrol_section", configfile >> "CfgGroups" >> "east" >> "LOP_ISTS_OPF" >> "Infantry" >> "LOP_ISTS_OPF_Rifle_squad", configfile >> "CfgGroups" >> "east" >> "LOP_ISTS_OPF" >> "Infantry" >> "LOP_ISTS_OPF_Support_section" ]; _spawnPos = [player, 500, (RANDOM 360)] call BIS_fnc_relPos; _spawnPos = [_spawnPos, 1, 150, 3, 0, 20, 0] call BIS_fnc_findSafePos; _grp = [ _spawnPos, EAST, ( selectRandom _islamicState ) ] call BIS_fnc_spawnGroup; { _x setskill 0.25; } forEach units _grp; _wp = _grp addWaypoint [position player, 0]; [_grp, 1] setWaypointType "SAD"; [_grp, 1] setWaypointSpeed "FULL"; { null = [_x] execVM "AL_searchlight\al_search_light_ini.sqf" } forEach units _grp; while {({alive _x} count units _grp) > 1} do { sleep 120; deleteWaypoint [_grp, 1]; _wp = _grp addWaypoint [position player, 1]; [_grp, 1] setWaypointType "SAD"; [_grp, 1] setWaypointSpeed "FULL"; }; waitUntil {({alive _x} count units _grp) < 1}; deleteWaypoint [_grp, 1]; deleteGroup _grp; }; }; } forEach playableUnits;
  5. Right. I have fixed the issue with spawning only INDEP (my mistake, i removed the WEST config array as not needed, but putting it back works). I have also made a check on _sideID as follows: systemchat format ["SideID: %1", _sideID]; //<< Debug to grab _sideID _faction = Nil; if ( _sideID == 0 ) then { _faction = East }; if ( _sideID == 1 ) then { _faction = West }; if ( _sideID == 2 ) then { _faction = Independent }; _grp = [_spawnPos, _faction, (selectRandom ( CFC_fnc_groupTemplates select _sideID ) ) ] call BIS_fnc_spawnGroup; This will now change the faction depending on the _sideID so all is working. However, when 1 group is dead, the code loops and spawns in 2 more groups (1x INDEP & 1x OPFOR) thus giving me 3 groups hunting a player when i need a maximum of 2 per player.
  6. Although it seems to loop over and over spawning groups in every second or so.... And it is only spawning in INDEP.
  7. Nevermind, it's patch day lol Had to disable my mods
  8. This is throwing me an error stating: Error Params: type string, expected array. But thanks for your help thus far again. This is also helping me to understand a little better.
  9. That works nicely in testing locally. My plan is to spawn 1 green and 1 red group to hunt down players. Is there a semantic way to add in a red group too or would i need to replicate this with edits?
  10. Grumpy! I can always rely on you to dig me out the sh*t! As always, you rock.... I'll look into this cheers.
  11. I have no errors, works superbly on my LAN hosted session, but on my dedicated server the enemy do not spawn. I have vehicles and choppers spawning fine, but im trying to spawn an enemy squad for each player that moves towards them.... Im getting quite frustrated with it lol
  12. This is what i have thus far, and it is still broken :( Trying to learn dedi scripting is fun but hard lol all wrapped in: if (isServer) then { //here }; 0 = [] spawn { _players = playableUnits + switchableUnits; waitUntil { count _players > 0 }; if ( count _players > 0 ) then { { _player = _x; if (!isNull _player) then { _pos = getPosATL _player; for '_i' from 0 to 999999 do { _islamicState = [ configfile >> "CfgGroups" >> "Indep" >> "CUP_I_PMC_ION" >> "Infantry" >> "CUP_I_PMC_ION_Field_Security_Patrol", configfile >> "CfgGroups" >> "Indep" >> "CUP_I_PMC_ION" >> "Infantry" >> "CUP_I_PMC_ION_Field_Security_Team", configfile >> "CfgGroups" >> "Indep" >> "CUP_I_PMC_ION" >> "Infantry" >> "CUP_I_PMC_ION_Field_Support_Team", configfile >> "CfgGroups" >> "Indep" >> "CUP_I_PMC_ION" >> "Infantry" >> "CUP_I_PMC_ION_Security_Detail", configfile >> "CfgGroups" >> "Indep" >> "CUP_I_PMC_ION" >> "Infantry" >> "CUP_I_PMC_ION_Security_Specialists", configfile >> "CfgGroups" >> "Indep" >> "CUP_I_PMC_ION" >> "Infantry" >> "CUP_I_PMC_ION_VIP_Bodyguard" ]; _spawnPos = [_pos, 200, (RANDOM 360)] call BIS_fnc_relPos; _spawnPos = [_spawnPos, 1, 150, 3, 0, 20, 0] call BIS_fnc_findSafePos; _grp = [ _spawnPos, INDEPENDENT, ( selectRandom _islamicState ) ] call BIS_fnc_spawnGroup; { _x setskill 0.25; } forEach units _grp; _wp = _grp addWaypoint [position _player, 0]; [_grp, 1] setWaypointType "SAD"; [_grp, 1] setWaypointSpeed "FULL"; { null = [_x] execVM "AL_searchlight\al_search_light_ini.sqf" } forEach units _grp; while {({alive _x} count units _grp) > 1} do { sleep 90; deleteWaypoint [_grp, 1]; _wp = _grp addWaypoint [position _player, 1]; [_grp, 1] setWaypointType "SAD"; [_grp, 1] setWaypointSpeed "FULL"; }; waitUntil {({alive _x} count units _grp) < 1}; deleteWaypoint [_grp, 1]; deleteGroup _grp; }; }; } forEach _players; } else {}; };
  13. Is that the reason for it not working do you think?
  14. I'm currently working on the same kind of thing: I am creating a custom module that uses the UPSMON built in spawn function (using randoms & unit array). No static marker, instead a marker is placed on the position of the module @ 2000m square. When all units in the squad are dead, the marker then deletes... Next i'm working on marker position update every 60 seconds on the squad leaders position... ["[CFC] Takistan Locals","INFANTRY", { _markerPrefix = floor random 999999; _patrolMarker = createMarker ["patrolMarker" + (str _markerPrefix), _this select 0]; _patrolMarker setMarkerAlpha 0; _patrolMarker setMarkerShape "RECTANGLE"; _patrolMarker setMarkerSize [2000, 2000]; _grp = [_this select 0,INDEPENDENT,[ "CUP_I_TK_GUE_Soldier_AA", "CUP_I_TK_GUE_Soldier_AR", "CUP_I_TK_GUE_Guerilla_Medic", "CUP_I_TK_GUE_Demo", "CUP_I_TK_GUE_Soldier", "CUP_I_TK_GUE_Soldier_AK_47S", "CUP_I_TK_GUE_Soldier_HAT", "CUP_I_TK_GUE_Guerilla_Enfield", "CUP_I_TK_GUE_Soldier_GL", "CUP_I_TK_GUE_Soldier_M16A2", "CUP_I_TK_GUE_Soldier_AAT", "CUP_I_TK_GUE_Soldier_AT", "CUP_I_TK_GUE_Sniper", "CUP_I_TK_GUE_Mechanic", "CUP_I_TK_GUE_Soldier_MG", "CUP_I_TK_GUE_Soldier_TL", "CUP_I_TK_GUE_Commander" ],[2,4],2,[_patrolMarker,"SPAWNED","CARELESS","DELETE:",80,"NOVEH","COLUMN","LIMITED"]] call UPSMON_CreateGroup; {_X addCuratorEditableObjects [units _grp,true];} forEach AllCurators; while {true} do { if ( { alive _x } count (units _grp) < 1) then { deleteMarker _patrolMarker; }; }; }] call Ares_fnc_RegisterCustomModule;
  15. After practicing a bit with 3DS MAX i now feel confident enough to take the plunge and design my first Arma3 model. I plan on building a simple modern house and would like to know of any standard dimensions for arma3 buidlings. Looking for things like: Wall thickness Door width & height Steps height & depth etc... Typical dimensions of current buildings within the game. (off subject, but road width would be a nice one to know) And is there any vanilla textures i can use with my model to make it not look out of place within arma? Any info or a point in the right direction would be awesome! Regards
  16. An of you gurus out there know whether, and if so, how i could turn this into a loop for each player on the server rather than naming each element and referencing it? Although this works, just wondering if there is a cleaner way of doing it? _p1StartPos =[getMarkerpos "Spawn", 1, 900, 3, 0, 45, 0] call BIS_fnc_findSafePos; player1 setPos _p1StartPos; _p2StartPos =[getMarkerpos "Spawn", 1, 900, 3, 0, 45, 0] call BIS_fnc_findSafePos; player2 setPos _p2StartPos; _p3StartPos =[getMarkerpos "Spawn", 1, 900, 3, 0, 45, 0] call BIS_fnc_findSafePos; player3 setPos _p3StartPos; _p4StartPos =[getMarkerpos "Spawn", 1, 900, 3, 0, 45, 0] call BIS_fnc_findSafePos; player4 setPos _p4StartPos; _p5StartPos =[getMarkerpos "Spawn", 1, 900, 3, 0, 45, 0] call BIS_fnc_findSafePos; player5 setPos _p5StartPos; _p6StartPos =[getMarkerpos "Spawn", 1, 900, 3, 0, 45, 0] call BIS_fnc_findSafePos; player6 setPos _p6StartPos; _p7StartPos =[getMarkerpos "Spawn", 1, 900, 3, 0, 45, 0] call BIS_fnc_findSafePos; player7 setPos _p7StartPos; _p8StartPos =[getMarkerpos "Spawn", 1, 900, 3, 0, 45, 0] call BIS_fnc_findSafePos; player8 setPos _p8StartPos; _p9StartPos =[getMarkerpos "Spawn", 1, 900, 3, 0, 45, 0] call BIS_fnc_findSafePos; player9 setPos _p9StartPos; Regards
  17. Yea i know, i was just playing and testing and never reset from 45 lol Thanks for the heads up though :)
  18. Worked like a charm, thanks Nikander! Looks a lot neater too lol
  19. RoryRothon

    player distance player & join

    Works like a charm sir :) I noticed the double forEach too, saved me a job. thanks again Grunmpy, you rock! Regards Rory
  20. RoryRothon

    player distance player & join

    Tried something very close to that but left _x in the array brackets and had group in different location lol I'll give it a whirl and let you know :) Many thanks again ( you've been awesome! ) Rory
  21. RoryRothon

    player distance player & join

    Just to join any 2 groups that get close to eachother. The first objective is to find all fellow players with a trigger to check all players are grouped before firing the next task, if that makes sense lol So i'm not fussed about smaller group joining bigger, but simply having 2 groups regardless of size merge into 1. 1) Player group player 2) player join player group 3) group merge group 4) Final - group with all players in. Regards
  22. RoryRothon

    player distance player & join

    Although players now join a group if they are are ungrouped, i now have the issue of 2 groups getting less than 10m away from each other. For the life of me i cant seem to find out how to get 2 groups merged to one. Is there a way i can do the same check as above but for groups? Anyone in the know care to share their thoughts? Regards Rory
  23. RoryRothon

    player distance player & join

    Grumpy Old Man - You are a legend! Ive gotten over my blonde moment and got it working lol Here is what i have: _loop = [] spawn { _isInGroup = { params ["_unit"]; count units group _unit > 1 }; MyPlayerAutojoin = true; while {MyPlayerAutojoin} do { { if ( player call _isInGroup AND !(_x call _isInGroup) AND player distance _x <= 10) then { [_x] join group player; } else { if ( !(player call _isInGroup) AND !(_x call _isInGroup) AND player distance _x <= 10) then { [_x] join group player; } } forEach (allPlayers - [player]); } forEach (allPlayers - [player]); sleep 1; }; }; Tested with 2 un-grouped players, and 1 grouped / 1 un-grouped and all seems to work :) Thanks again, this will certainly be used on a lot of my future mission devs :) thanks and regards Rory
  24. RoryRothon

    player distance player & join

    After tinkering with it, i have noticed that the coded checks for 1 player in a group, and 1 thats not.... It does not check for both not in group. Ive used an else statement for testing: { if (player call _isInGroup AND !(_x call _isInGroup) AND player distance _x <= 10) then { [_x] join group player; } else { [_x] join player; } } forEach (allPlayers - [player]); And this seems to work (ignore the lack of checks), but loops over and over and i i get is "2 JOIN GROUP" over and over lol The foundations are good, i'll just need to play around with it :) Thanks for the help !
  25. A few links maybe worth a look :) UPSMON eos Loot System Side Mission Scripts There are a lot of ready made scripts out there to use, and UPSMON is certainly one of my favorites :)
×