Jump to content

total

Member
  • Content Count

    118
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by total

  1. This certainly wasn't as easy as the theory. :( For example: - A sector is under the control of Opfor with some soldiers, and the marker is Red. - Independent attacks the sector and once they pass within the trigger zone, the marker gets Green. - Opfor kills the Independent units and the marker gets Blue and not Red. - Independent gets back with some new units (The marker gets Green) and kills Opfor - The marker gets Blue and not Green. You see that this doesn't work? How I want it to work: If the sector is under the control of Opfor and marker is Red. The marker shouldn't get Green before Independent have killed all the Opfor units and is within the trigger zone, and vice versa. If there is no enemy soldiers within the trigger Zone, the marker gets blue. Is there some sick way to get this to work?
  2. This has probably been asked a hundred times before, but still, I can't figure it out. :( What I want is to spawn exactly what I did in the editor (with exact waypoints) with a Trigger. Can anyone help me with putting together an "On act" script for my trigger with the info below? class Item1 { side="EAST"; class Vehicles { items=4; class Item0 { position[]={14066.943,14.228237,17523.59}; id=1; side="EAST"; vehicle="O_soldier_TL_F"; leader=1; rank="SERGEANT"; skill=0.46666664; }; class Item1 { position[]={14071.943,14.34555,17518.59}; id=2; side="EAST"; vehicle="O_soldier_AA_F"; rank="CORPORAL"; skill=0.33333331; }; class Item2 { position[]={14061.943,14.27914,17518.59}; id=3; side="EAST"; vehicle="O_soldier_AA_F"; skill=0.2; }; class Item3 { position[]={14076.943,14.385554,17513.59}; id=4; side="EAST"; vehicle="O_soldier_AAA_F"; skill=0.2; }; }; class Waypoints { items=4; class Item0 { position[]={14230.033,14.379024,17612.076}; combatMode="RED"; speed="NORMAL"; combat="SAFE"; class Effects { }; showWP="NEVER"; }; class Item1 { position[]={14414.781,17.423283,17696.17}; combatMode="RED"; speed="NORMAL"; combat="SAFE"; class Effects { }; showWP="NEVER"; }; class Item2 { position[]={14415.356,17.463614,17690.428}; combatMode="RED"; speed="NORMAL"; combat="SAFE"; class Effects { }; showWP="NEVER"; }; class Item3 { position[]={14079.998,14.377373,17522.246}; type="CYCLE"; class Effects { }; showWP="NEVER"; }; };
  3. Caching? It seems like it's my waypoints that are the problem. How can I get UPS to run after the waypoint is completed? In the worst case, how can I put Sleep on UPS, so it doesn't run until after 2-3 minutes? Waypoint = 0 If waypoint = 1 run UPS.sqf if (!isServer) exitwith {}; _side = createCenter EAST; // Anti Air Squad - Gravia _01_wp0 = getMarkerPos "01_wp0"; _01Squad = [getMarkerPos "01_spawn", _side, ["O_soldier_TL_F","O_soldier_TL_F", "O_soldier_AA_F", "O_soldier_AA_F", "O_soldier_AA_F"], [], [], [0.3, 0.6]] call BIS_fnc_spawnGroup; [leader _01Squad,"Alpha","random"] execVM "ups.sqf"; _wp0 = _01Squad addWaypoint [ _01_wp0,0]; _wp0 setWaypointType "MOVE"; _wp0 setWaypointStatements ["true", ""]; _wp0 setWaypointCombatMode "RED"; _wp0 setWaypointSpeed "NORMAL";
  4. total

    Stuttering on Stratis and Altis

    Last week I played with Ultra settings with stable 55-60 fps. Today I'm playing with max 40 fps, with a lot of stuttering , regardless of settings. Something must be wrong with the latest Dev branch update??
  5. But why does my array spawned units disappear as soon as they run UPS ? Is it possible to get the leader to not run UPS before last waypoint is completed?
  6. Thanks, that fixed the problem. Now it has suddenly appeared an new error message. AI spawns, but disappear 1-2 seconds later when this error message pops up: Error in expression <KRON_TRGFlag=KRON_Trig_EAST_Alpha> Error position: <KRON_Trig_EAST_Alpha> Error Undefined variable in expression: kron_trig_east_alpha
  7. Error in expression <c) then {_exit = false;} } else { if (count _obj>0) then { {if (alive _x) then> Error position: <count _obj>0) then { {if (alive _x) then> Error count: Type Group, expected Array,Config entry File C:\Users\Total\Documents\Arma 3 - Other Profiles\[aCe]Total\missions\[aCe]COOP_test.Altis\ups.sqf, line 191 What's wrong? if (!isServer) exitwith {}; _side = createCenter EAST; // Anti Air Squad - Gravia _01_wp0 = getMarkerPos "01_wp0"; _01Squad = [getMarkerPos "01_spawn", _side, ["O_soldier_TL_F","O_soldier_TL_F", "O_soldier_AA_F", "O_soldier_AA_F", "O_soldier_AA_F"], [], [], [0.3, 0.6]] call BIS_fnc_spawnGroup; [_01Squad,"Alpha","random"] execVM "ups.sqf"; _wp0 = _01Squad addWaypoint [ _01_wp0,0]; _wp0 setWaypointType "MOVE"; _wp0 setWaypointStatements ["true", ""]; _wp0 setWaypointCombatMode "RED"; _wp0 setWaypointSpeed "NORMAL"; // unit that's moving _obj = _this select 0; _npc = _obj; // is anybody alive in the group? _exit = true; if (typename _obj=="OBJECT") then { if (alive _npc) then {_exit = false;} } else { if (count _obj>0) then { {if (alive _x) then {_npc = _x; _exit = false;}} forEach _obj; }; };
  8. _01Squad = setvariable [nul=[this,"sector1","NOAI"] execVM "ups.sqf"]; Error message: Missing ; Whats wrong?
  9. I want to connect this script with Urban Patrol. What's wrong? if (!isServer) exitwith {}; _side = createCenter EAST; // Anti Air Squad - Gravia _01_wp0 = getMarkerPos "01_wp0"; _01Squad = [getMarkerPos "01_spawn", _side, ["O_soldier_TL_F","O_soldier_TL_F", "O_soldier_AA_F", "O_soldier_AA_F", "O_soldier_AA_F"], [], [], [0.3, 0.6]] call BIS_fnc_spawnGroup; _01Squad = setvariable ["nul=[this,""Sector1"",""random""] execVM ""ups.sqf""], true]; _wp0 = _01Squad addWaypoint [ _01_wp0,0]; _wp0 setWaypointType "MOVE"; _wp0 setWaypointStatements ["true", ""]; _wp0 setWaypointCombatMode "RED"; _wp0 setWaypointSpeed "NORMAL"; Is this the right way to get all units to run UPS? _01Squad = setvariable ["nul=[this,""Sector1"",""random""] execVM ""ups.sqf""], true]; 1) AI spawns 2) Follows the waypoint into the marker "Sector1" 3) Generates new random waypoints with UPS inside the marker "Sector1". If not, how can I get this to work?
  10. I have been very active with asking for help, but I still need some help with my Sector Control Coop mission. What I want to achieve is random attacks on these sectors, which are controlled by the color of the marker/Sector. Some info: - One attack every 15 minutes on a random Sector (1-30) - The attacks are controlled as follows: If the marker is BLUE = One attack group/Vehicle from either OpFor or Independent. If the marker is RED = One attack group/Vehicle from Independent. If the marker is GREEN = One attack group/Vehicle from OpFor. - All attacking units/vehicles will have waypoints, so I hope it is possible to modify the spawn script I use today: if (!isServer) exitwith {}; _side = createCenter INDEPENDENT; // Independent Random Attacks - Gravia _random01_wp0 = getMarkerPos "random01_wp0"; _random01_wp1 = getMarkerPos "random01_wp1"; _random01_wp2 = getMarkerPos "random01_wp2"; _random01_wp3 = getMarkerPos "random01_wp3"; _random01_wp4 = getMarkerPos "random01_wp4"; _random_indep = [getMarkerPos "random_attack", _side, ["I_soldier_TL_F","I_soldier_TL_F", "I_soldier_AA_F", "I_soldier_AA_F", "I_soldier_AA_F"], [], [], [0.3, 0.6]] call BIS_fnc_spawnGroup; _wp0 = _random_indep addWaypoint [ _random01_wp0,0]; _wp0 setWaypointType "MOVE"; _wp0 setWaypointStatements ["true", ""]; _wp0 setWaypointCombatMode "RED"; _wp0 setWaypointSpeed "NORMAL"; _wp1 = _random_indep addWaypoint [ _random01_wp1,1]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointStatements ["true", ""]; _wp1 setWaypointCombatMode "RED"; _wp1 setWaypointSpeed "NORMAL"; _wp2 = _random_indep addWaypoint [ _random01_wp2,2]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointStatements ["true", ""]; _wp2 setWaypointCombatMode "RED"; _wp2 setWaypointSpeed "NORMAL"; _wp3 = _random_indep addWaypoint [ _random01_wp3,3]; _wp3 setWaypointType "MOVE"; _wp3 setWaypointStatements ["true", ""]; _wp3 setWaypointCombatMode "RED"; _wp3 setWaypointSpeed "NORMAL"; _wp4 = _random_indep addWaypoint [ _random01_wp4,4]; _wp4 setWaypointType "CYCLE"; _wp4 setWaypointStatements ["true", ""]; Hoping for some smart solutions from the experts here. Thank you! To me this sounds impossible, but you never know :)
  11. Thank you! I will try to add the Urban Patrol Script or something similar ;)
  12. That's right, all sectors are markers. I didn't get this to work. I first tried : 0 = [_attackGroup, (getMarkerPos _currentSector), (​​(getMarkerSize _Sector) select 0)] call BIS_fnc_taskPatrol; but then I got error messages: Fn_findSafePost.sqf, line 90 Undefined variable in exp. _maxdist, _newX I then tried: 0 = [_attackGroup, (getMarkerPos _currentSector), (​​(getMarkerSize _currentSector) select 0)] call BIS_fnc_taskPatrol; but they still stop at random places around the markers and not inside the markers.
  13. Thank you, Zenophon! This worked well! How can I get everyone to stay within the markers (last waypoint)?
  14. Is it no one who can help, who knows what could be wrong? This frustrates me .. : p
  15. private ["_sectorArray","_currentSector","_attackingSide","_attackGroup","_spawnPosition","_attackingVehicle"]; if !(isServer) exitWith {}; _sectorArray = ["sector1", "sector2", "sector3"]; while {true} do { sleep (60 * 1); _currentSector = _sectorArray select (floor (random ((count _sectorArray) - 0.0001))); switch (getMarkerColor _currentSector) do { case "ColorBlue": { _attackingSide = [independent, east] select (floor (random 1.999)); _attackingVehicle = ["", ""] select (floor (random 1.999)); }; case "ColorRed": { _attackingSide = independent; _attackingVehicle = ""; }; case "ColorGreen": { _attackingSide = east; _attackingVehicle = ""; }; }; _spawnPosition = [(((getMarkerPos _currentSector) select 0) + ((random 300) * (cos (random 360)))),(((getMarkerPos _currentSector) select 1) + ((random 300) * (sin (random 360)))), 0]; if ((random 1) > 0.3) then { _attackGroup = [_spawnPosition, _attackingSide, (3 + (floor (random 2.99)))] call BIS_fnc_spawnGroup; } else { _attackGroup = ([_spawnPosition, 0, _attackingVehicle, _attackingSide] call BIS_fnc_spawnVehicle) select 2; }; 0 = [_attackGroup, (getMarkerPos _currentSector), 100] call BIS_fnc_taskPatrol; _attackGroup setCombatMode "RED"; }; Thanks, that removes the error messages ingame, but not in the error log. I still have no units that spawn. What's wrong? ---------- Post added at 11:57 ---------- Previous post was at 11:06 ---------- Maybe I need to do something like this?, but random groups is what I want :) private ["_side1","_side2","_sectorArray","_currentSector","_attackingSide","_attackGroup","_spawnPosition","_attackingVehicle","_independent","_east","_indepVehicle","_eastVehicle"]; if !(isServer) exitWith {}; _side1 = createCenter INDEPENDENT; _side2 = createCenter EAST; _sectorArray = ["sector1", "sector2", "sector3"]; _independent = [_side1,["I_soldier_TL_F","I_soldier_TL_F", "I_soldier_AA_F", "I_soldier_AA_F", "I_soldier_AA_F"]]; _indepVehicle = [""]; _east = [_side2,["O_soldier_TL_F","O_soldier_TL_F", "O_soldier_AA_F", "O_soldier_AA_F", "O_soldier_AA_F"]]; _eastVehicle = [""]; while {true} do { _currentSector = _sectorArray select (floor (random ((count _sectorArray) - 0.0001))); switch (getMarkerColor _currentSector) do { case "ColorBlue": { _attackingSide = [_independent, _east] select (floor (random 1.999)); _attackingVehicle = [_indepVehicle, _eastVehicle] select (floor (random 1.999)); }; case "ColorRed": { _attackingSide = _independent; _attackingVehicle = _indepVehicle; }; case "ColorGreen": { _attackingSide = _east; _attackingVehicle = _eastVehicle; }; }; _spawnPosition = [(((getMarkerPos _currentSector) select 0) + ((random 300) * (cos (random 360)))),(((getMarkerPos _currentSector) select 1) + ((random 300) * (sin (random 360)))), 0]; if ((random 1) > 0.3) then { _attackGroup = [_spawnPosition, _attackingSide, (3 + (floor (random 2.99)))] call BIS_fnc_spawnGroup; } else { _attackGroup = ([_spawnPosition, 0, _attackingVehicle, _attackingSide] call BIS_fnc_spawnVehicle) select 2; }; 0 = [_attackGroup, (getMarkerPos _currentSector), 100] call BIS_fnc_taskPatrol; _attackGroup setCombatMode "RED"; };
  16. I get 300000 lines in my error log file. Here is some of it: http://pastebin.com/CWnzgiwz Does anyone have an idea?
  17. Hm, I can't get this to work. To test this, I created 3 red markers (Sector1, Sector2 and Sector3) and a trigger. No unit spawns! nul = execVM "Aigroups\test.sqf"; hint "Random Spawn test!"; if !(isServer) exitWith {}; _sectorArray = ["sector1", "sector2", "sector3"]; while {true} do { sleep (60 * 15); _currentSector = _sectorArray select (floor (random ((count _sectorArray) - 0.0001))); switch (getMarkerColor _currentSector) do { case "ColorBlue": { _attackingSide = [independent, east] select (floor (random 1.999)); _attackingVehicle = ["", ""] select (floor (random 1.999)); }; case "ColorRed": { _attackingSide = independent; _attackingVehicle = ""; }; case "ColorGreen": { _attackingSide = east; _attackingVehicle = ""; }; }; _spawnPosition = [(((getMarkerPos _currentSector) select 0) + ((random 300) * (cos (random 360)))),(((getMarkerPos _currentSector) select 1) + ((random 300) * (sin (random 360)))), 0]; if ((random 1) > 0.3) then { _attackGroup = [_spawnPosition, _attackingSide, (3 + (floor (random 2.99)))] call BIS_fnc_spawnGroup; } else { _attackGroup = ([_spawnPosition, 0, _attackingVehicle, _attackingSide] call BIS_fnc_spawnVehicle) select 2; }; 0 = [_attackGroup, (getMarkerPos _currentSector), 100] call BIS_fnc_taskPatrol; _attackGroup setCombatMode "RED"; };
  18. Aha, "on deact" ... had completely forgotten that it existed, hehe. Thank you for your help!
  19. Hehe, what I'm asking for is a smart way to do what I want. I know how to change the color of a marker with one trigger, but I don't understand how to do this, when we are talking about 3 colors and 3 unit sides. As I see it, it will not work with multiple triggers alone. So I'm hoping for some expert help here :)
  20. So it isn't possible to just use one trigger?
  21. @Delta99: I've tried to remove it, but still it doesn't work. The unit spawns, but the waypoinst doesn't work at all.
  22. I can't get the waypoint positions to work. I tried creating markers with positions and use getMarkerpos on waypoints, but nothing works.
  23. Need help! :p I can't find an example with position numbers, only objects, units or markers. 1) setWaypointPosition or addwaypoint? I get Error Type Number 2) How do I replace AA_Squad_spawn1-marker with position? if (!isServer) exitwith {}; _side = createCenter EAST; _AASquad1 = [getMarkerPos "AA_Squad_spawn1", _side, ["O_soldier_TL_F", "O_soldier_AA_F", "O_soldier_AA_F", "O_soldier_AA_F"], [], [], [0.3, 0.6]] call BIS_fnc_spawnGroup; _wp1 = _AASquad1 addWaypoint [14230.033,14.379024]]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointStatements ["true", ""]; _wp1 setWaypointCombatMode "RED"; _wp1 setWaypointSpeed "NORMAL"; _wp2 = _AASquad1 addWaypoint [14414.781,17.423283]]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointStatements ["true", ""]; _wp2 setWaypointCombatMode "RED"; _wp2 setWaypointSpeed "NORMAL"; _wp3 = _AASquad1 addWaypoint [14415.356,17.463614]]; _wp3 setWaypointType "MOVE"; _wp3 setWaypointStatements ["true", ""]; _wp3 setWaypointCombatMode "RED"; _wp3 setWaypointSpeed "NORMAL"; _wp4 = _AASquad1 addWaypoint [14079.998,14.377373]]; _wp4 setWaypointType "CYCLE"; _wp4 setWaypointStatements ["true", ""]; or this? I have no idea. if (!isServer) exitwith {}; _side = createCenter EAST; _AASquad1 = [getMarkerPos "AA_Squad_spawn1", _side, ["O_soldier_TL_F", "O_soldier_AA_F", "O_soldier_AA_F", "O_soldier_AA_F"], [], [], [0.3, 0.6]] call BIS_fnc_spawnGroup; _marker1 = createMarker ["wp1", [14230.033,14.379024]]; _marker1 setMarkerType "mil_destroy"; _marker1 setMarkerColor "ColorRed"; _marker2 = createMarker ["wp2", [14414.781,17.423283]]; _marker2 setMarkerType "mil_destroy"; _marker2 setMarkerColor "ColorRed"; _marker3 = createMarker ["wp3", [14415.356,17.463614]]; _marker3 setMarkerType "mil_destroy"; _marker3 setMarkerColor "ColorRed"; _marker4 = createMarker ["wp4", [14079.998,14.377373]]; _marker4 setMarkerType "mil_destroy"; _marker4 setMarkerColor "ColorRed"; _wp1 = _AASquad1 addWaypoint [getMarkerPos "wp1", 0]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointStatements ["true", ""]; _wp1 setWaypointCombatMode "RED"; _wp1 setWaypointSpeed "NORMAL"; _wp2 = _AASquad1 addWaypoint [getMarkerPos "wp2", 0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointStatements ["true", ""]; _wp2 setWaypointCombatMode "RED"; _wp2 setWaypointSpeed "NORMAL"; _wp3 = _AASquad1 addWaypoint [getMarkerPos "wp3", 0]; _wp3 setWaypointType "MOVE"; _wp3 setWaypointStatements ["true", ""]; _wp3 setWaypointCombatMode "RED"; _wp3 setWaypointSpeed "NORMAL"; _wp4 = _AASquad1 addWaypoint [getMarkerPos "wp4", 0]; _wp4 setWaypointType "CYCLE"; _wp4 setWaypointStatements ["true", ""];
  24. Thanks, I know. Now I want to learn how to use Arrays and get it to work like Larrow suggested. :) But I don't have a clue where to start, hehe. If someone could use the information from the first post in this thread and make ​​a small example, I would be eternally grateful :)
×