-
Content Count
65 -
Joined
-
Last visited
-
Medals
Community Reputation
1 NeutralAbout R0T
-
Rank
Corporal
-
Her is the thread with my problem ! http://forums.bistudio.com/showthread.php?t=179037
-
Are you getting any skript errors when you start it the first time ? Had the same problem with one of my scripts solution was just too wait for a function too get initialized Maybe this helps ! https://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Initialization_Order
-
Hey Deform I'm also very new too skripting but this should work without any isserver and such snippets. The hole FHQ TaskTracker is multiplayer an JIP ready so I think you don't have to worrie about that.
-
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 ;)
-
Hey Tajin thx allot that fixes my prob. I thought the init.sqf would be faster then the init field of a unit. But hey new stuff learned - CHECK :D
-
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;)
-
UPSMON Updated to ArmaIII
R0T replied to cool=azroul13's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 ;) -
New 'Advanced' waypoints use (particularly fire support waypoint)
R0T replied to shifty_ginosaji's topic in ARMA 3 - MISSION EDITING & SCRIPTING
For the land waypoint .... Maybe something like that ??? https://community.bistudio.com/wiki/landAt Just wild guessing !!! -
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 ;)
-
Learn Arma 3 scripting - question about logics - locality and best use
R0T replied to m0nkey's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe this helps ? I think he can explain very well ;) http://killzonekid.com/arma-scripting-tutorials-basic-multiplayer-coding/ http://killzonekid.com/arma-scripting-tutorials-locality/ -
UPSMON Updated to ArmaIII
R0T replied to cool=azroul13's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thx azroul for the quick replay and your awesome work. Looking forward too this fix. -
UPSMON Updated to ArmaIII
R0T replied to cool=azroul13's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 ---------- Nobody has the same problems with small markers ? -
Ok then in the init! Thx again ! Sometimes it is complicated not losing track of all these init lines and triggers and units and and and ..... ;)
-
Haha thank you for that very quick replay - works ;) One more question - Is there any difference too do this in a game logic or in the init.sqf ?
-
Hey I'm relatively new too this editing and have a noobisch question. I want a OR condition check in a waypoint. So I wrote this code line. ((Check1) OR (Check2)) My problem is it fires only If both checks are true ...... I don't get it. I thought this fires if one of thme are true ???