Jump to content

R0T

Member
  • Content Count

    65
  • Joined

  • Last visited

  • Medals

Posts posted by R0T


  1. Sorry english is not my native language so explaining is not the strongest part :j: So the problem I currently have is task notification. It doesent pop up any kind of "task assigned" or "task succeeded" when I complete or assign new tasks.

    The Task state must be set for every task on his one.

    For example you want to canceled a task and creat an new one on the run in the Mission you have too make a new one.

    ["Task1","canceled"] call FHQ_TT_setTaskState;
    			sleep 4;                                        //skript waits her so the notifications are not colliding
    
        // ------------------ CREAT A NEW TASK FOR  WEST AND ASSIGNED IT ----------------------------
    			[
    				west,                                                                   // Task for the west 
    					["Task2",
    					 "Long description of the Task",
    					 "Name of the Task you see in the notification",
    					 "Waypoint Text",				                // Waypoint text
    					getmarkerpos "Marker or Objekt Name",	        // Optional: Position or object in ""
    					"assigned"				                        // Optional: Initial state of the created Task
    					]
    			] call FHQ_TT_addTasks;

    So task1 is canceled and then task 2 is created and get assigned to the player. You can have this in a extra sqf and call it from a trigger or write it in the trigger "on activation" condition.

    What Varanon wrote works when you have defined the task in the briefing. But how i understand you, you don't want too see the task from the beginning in your task list. So you have too creat them on the run. Hope this helps ;)


  2. Hey Folks,

    i wrote a skript for a random patrol but now stuck on a expression that the game throws at me and i can't find my mistake :confused:

    the error

    if (((getPos leader _Pat)distance _posNew)< 35) then 
    {
    if (_wait) then 
    {>
     Error position: <_posNew)< 35) then 
    {
    if (_wait) then 
    {>
     Error Undefined variable in expression: _posnew
    File C:\Users\Sam.N.Raub\Documents\Arma 3\missions\JSP_JustSimplePatrol.Altis\JSP.sqf, line 212
    Error in expression <;
    };

    My problem is this error occurs just for the first run after i started arma 3 and run the skript the first time. The second time i run the skript the error is gone.For me it looks like i don't have defined the variable _posNew (is a array that have a position in it [x,y,z]) not right but i did it at the beginning of the skript. I hope someone can help. Im really at the beginning with scripting. When anybody see something that could be improved ... pleas gimmi a hint so i can learn somthing new.

    Her is the whole skript

    /*--------------------------------------------------------------------------*/
    /*------------------------------- - JSP.sqf - ------------------------------*/
    /*--------------------------- - JustSimplePatrol - -------------------------*/
    /*------------------------------- - by R0T - -------------------------------*/
    /*--------------------------------------------------------------------------*/
    
    
    //Chance her if you want them to wait longer or shoorter on the Waypoint.
    _randomWait = 10; 
    
    
    /*-----------------------DON'T TOUCH ANYTHING FROM HER-----------------------*/
    
    
    private ["_Pat","_PatrolArea","_posNew","_PatGroup","_wait","_arrayLaenge","_ranStart","_firstRun","_BlackListArea","_thisArray","_WPointMarkerName","_PatrolMarker"];
    
    _thisArray		= _this;			// Um später die Blacklist raus zu filtern	
    _arrayLaenge 	= count _this; 
    _Pat 			= _this select 0;
    _PatGroup 		= group _Pat;
    _PatrolArea		= _this select 1;
    _PatrolMarker	= "";				// Für DEBUG
    _WPointMarkerName = "";				// Für DEBUG
    
    _wait 			= false;			
    _firstRun 		= true;
    _ranStart		= false;
    
    _posNew			= [];	
    _waterPos		= 0;				// Siehe SHK_pos und Wasserpositionen
    
    _KindOfMan = _Pat isKindOf "Man";
    _KindOfCar = _Pat isKindOf "Car";
    _KindOfAir = _Pat isKindOf "Air";
    
    //Standart behavior
    	_Pat setBehaviour 	"SAFE";
    	_Pat setSpeedMode 	"LIMITED";
    	_Pat setCombatMode 	"RED";
    	_Pat setFormation 	"LINE";
    
    
    
    if (_arrayLaenge > 2) then 
    {
     // Set Patrols behavior
    	if ("CARELESS" 	in _this) then {_Pat setBehaviour "CARELESS";
    									_thisArray = _thisArray - ["CARELESS"]};	
    	if ("SAFE" 		in _this) then {_Pat setBehaviour "SAFE";
    									_thisArray = _thisArray - ["SAFE"]};
    	if ("AWARE" 	in _this) then {_Pat setBehaviour "AWARE";
    									_thisArray = _thisArray - ["AWARE"]};
    	if ("COMBAT" 	in _this) then {_Pat setBehaviour "COMBAT";
    									_thisArray = _thisArray - ["COMBAT"]};
    	if ("STEALTH" 	in _this) then {_Pat setBehaviour "STEALTH";
    									_thisArray = _thisArray - ["STEALTH"]};
    
     // Set Formation "LINE"
    	if ("COLUMN"		in _this) then {_Pat setFormation "COLUMN";
    										_thisArray = _thisArray - ["COLUMN"]};	
    	if ("STAG_COLUMN" 	in _this) then {_Pat setFormation "STAG COLUMN";
    										_thisArray = _thisArray - ["STAG COLUMN"]};
    	if ("ECH_LEFT"		in _this) then {_Pat setFormation "ECH LEFT";
    										_thisArray = _thisArray - ["ECH LEFT"]};
    	if ("ECH_RIGHT" 	in _this) then {_Pat setFormation "ECH RIGHT";
    										_thisArray = _thisArray - ["ECH RIGHT"]};
    	if ("VEE" 			in _this) then {_Pat setFormation "VEE";
    										_thisArray = _thisArray - ["VEE"]};
    	if ("LINE" 			in _this) then {_Pat setFormation "LINE";
    										_thisArray = _thisArray - ["LINE"]};
    
     //Set Patrols speed
    	if ("LIMITED" 	in _this) then {_Pat setSpeedMode "LIMITED";			//"LIMITED" (half speed)
    									_thisArray = _thisArray - ["LINE"]};
    	if ("NORMAL" 	in _this) then {_Pat setSpeedMode "NORMAL";				//"NORMAL" (full speed, maintain formation)
    									_thisArray = _thisArray - ["NORMAL"]};
    	if ("FULL" 		in _this) then {_Pat setSpeedMode "FULL";				//"FULL" (do not wait for any other units in formation)
    									_thisArray = _thisArray - ["FULL"]};
    
     // Set Patrols CombatMode 
    	if ("BLUE" 		in _this) then {_Pat setCombatMode "BLUE";				//"BLUE" (Never fire)
    									_thisArray = _thisArray - ["BLUE"]};
    	if ("GREEN" 	in _this) then {_Pat setCombatMode "GREEN";				//"GREEN" (Hold fire - defend only)
    									_thisArray = _thisArray - ["GREEN"]};
    	if ("WHITE" 	in _this) then {_Pat setCombatMode "WHITE";				//"WHITE" (Hold fire, engage at will)
    									_thisArray = _thisArray - ["WHITE"]};
    	if ("YELLOW" 	in _this) then {_Pat setCombatMode "YELLOW"; 			//"YELLOW" (Fire at will)
    									_thisArray = _thisArray - ["YELLOW"]};
    	if ("RED" 		in _this) then {_Pat setCombatMode "RED";				//"RED" (Fire at will, engage at will)
    									_thisArray = _thisArray - ["RED"]};
    
     // Andere Parameter	
    	if ("WAIT" 		in _this) then 	{_wait = true; _thisArray = _thisArray - ["WAIT"]};
    	if ("RANDOM"	in _this) then 	{_ranStart = true; _thisArray = _thisArray - ["RANDOM"]};	
    
    };	
    
    // Liste mit BlackListArea's fertig machen	 
    _thisArray = _thisArray - [_Pat,_PatrolArea];	// Einheit und PatrolArea rausnehmen 
    _BlackListArea	= _thisArray;
    
    // Einheit zum Start teleportieren wenn "RANDOM"
    if (_ranStart) then 
    {
      if (_KindOfMan) then 
    	{
    		_ranStartPos =[_PatrolArea,_waterPos,_BlackListArea] call SHK_pos;										
    		{
    		_x setPos _ranStartPos;
    		}forEach units _PatGroup;
    	};
      if (_KindOfCar) then 
    	{
    		_ranStartPos =[_PatrolArea,_waterPos,_BlackListArea] call SHK_pos;										
    		_Pat setPos _ranStartPos;			
    	}
    };
    
    
    if (_KindOfMan) then 
    {
    
    while 	{({alive _x} count units _PatGroup) > 0} do
    	{
    	if (_firstRun) then 
    		{
    		_posNew = [_PatrolArea,_waterPos,_BlackListArea] call SHK_pos;
    		_Pat move _posNew;
    		_firstRun = false;
    		};
    
    	if (((getPos leader _Pat)distance _posNew)< 5) then 
    		{
    		if (_wait) then 
    			{
    			sleep (floor(random _randomWait));
    			_posNew = [_PatrolArea,_waterPos,_BlackListArea] call SHK_pos;
    			_Pat move _posNew;
    			} 
    			else 
    			{ 
    			_posNew = [_PatrolArea,_waterPos,_BlackListArea] call SHK_pos;
    			_Pat move _posNew;
    			};
    		};
    		sleep 1;
    	};
    };
    
    if (_KindOfCar) then 
    {
    
    while 	{({alive _x} count units _PatGroup) > 0} do
    	{
    	if (_firstRun) then 
    		{
    		_posNew = [_PatrolArea,_waterPos,_BlackListArea] call SHK_pos;
    
    		_Pat move _posNew;
    		_firstRun = false;
    		};
    
    	if (((getPos leader _Pat)distance _posNew)< 35) then 
    		{
    		if (_wait) then 
    			{
    			sleep (floor(random _randomWait));
    			_posNew = [_PatrolArea,_waterPos,_BlackListArea] call SHK_pos;
    			_Pat move _posNew;
    			} 
    			else 
    			{ 
    			_posNew = [_PatrolArea,_waterPos,_BlackListArea] call SHK_pos;
    			_Pat move _posNew;
    			};
    		};
    		sleep 1;
    	};
    };
    
    if (_KindOfAir) then 
    {
    _waterPos		= 1; 		//Allow Waterpositions in SHK_pos		
    while 	{({alive _x} count units _PatGroup) > 0} do
    	{
    	if (_firstRun) then 
    		{
    		_posNew = [_PatrolArea,_waterPos,_BlackListArea] call SHK_pos;
    		_Pat move _posNew;
    		_firstRun = false;
    		};
    
    	if (((getPos leader _Pat)distance _posNew)< 150) then 
    		{
    		if (_wait) then 
    			{
    			sleep (floor(random _randomWait));
    			_posNew = [_PatrolArea,_waterPos,_BlackListArea] call SHK_pos;
    			_Pat move _posNew;
    			} 
    			else 
    			{ 
    			_posNew = [_PatrolArea,_waterPos,_BlackListArea] call SHK_pos;
    			_Pat move _posNew;
    			};
    		};
    		sleep 1;
    	};
    };

    every help would be awsome .... thx in advance;)


  3. Just placing a patrol group of 3 out of in the middle of nowhere, with nothing else on the map, results in the leader having only 2 waypoints that are spaced 2m from each other. He just moves back and forth while the other two members hold position. How is this possible?.

    Same problem her! Azroul stated he will fix this in the next update. A workaround for me was not to use "RANDOM" an let them start outside of the markerArea. But it could also happen when they reach any waypoint. So what too say - I love the skript but in this state its just broken ans useless. I search the code on my own but im a noob in skripting :confused: So we have to wait for azrouls fix ;)


  4. setCaptive don't make you Friendly with other factions.

    When you are setCaptive true you are like not being on the map. For example a trigger that reacts on bluefor will not fire while you are a setCaptive ! But you can take damage when you get hit by a bullet or explosion.

    To enter good mode ;)

    unit1 allowDamage true;

    is the command you need.

    For the hint thing I can't help in not so far with the scripting knowledge ;)


  5. Hi!

    I have a very simple problem with the UPSMON. I did the first four steps in the guide but the units remain still. I think that it's caused because the script doesn't run. I reviewed meticulously my work and I didn't find any fail. I decided to upload the folder of my mission to see if someone can help me out.

    mega.co.nz/#!utQFWKiK!aPv5yACKkdswjYSTAzzZeVjBkzwhtTs3fzW9k0kNjZ0

    thank you so much.

    rafasl18

    I think this skript is for Arma3 and your map (utes) is from Arma2. I don't think this skript works in Arma2 !

    ---------- Post added at 21:56 ---------- Previous post was at 21:53 ----------

    Is there a minimum size for the area for the Patrol ? I have the problem that in a area with the size of 50x50 the group always get waypoints next to them. Walking 2 steps stop and getting next waypoint 2 steps away. Most of the time they just running around in one spot back an fourth. With a area greater 100x100 all works fine! Is this a known issue ??

    Nobody has the same problems with small markers ?


  6. Is there a minimum size for the area for the Patrol ? I have the problem that in a area with the size of 50x50 the group always get waypoints next to them. Walking 2 steps stop and getting next waypoint 2 steps away. Most of the time they just running around in one spot back an fourth. With a area greater 100x100 all works fine! Is this a known issue ??


  7. Hey im trying to use this skript for a mission but i don't get it ;)

    I want the patrol to be in the CARELESS mode at the start

    my init

    nul=[this,"area1","CARELESS"] execVM "scripts\upsmon.sqf";

    but they start with aiming down the sight - im think in SAFE mode. The wiki is no help so ... what am i doing wrong ? Or is this a bug ??

    Thx in advance for your help ;)


  8. He thanks for the Feedback.

    There are 2 units they begin fleeing when you attack the beach. If you kill them booth no alarm will trigger. So there is no area they have too leave to trigge the alarm. Maybe you haven't see them all ;)

    I hade once a ammobox inside the mission but I think it breaks the immersion of the game. I hate it when you start a mission and everybody standing 10 mins on the ammoboxes and searching for the equipment ;) so sorry I don't add this. I therefor added different units so you can choose a little bit. Also look in your inventory there is another aco !

×