-
Content Count
170 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by commanderx
-
Lags in Multiplayer cause of hint?
commanderx replied to commanderx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi John, thanks for your advice. I will test that and come back with the results :-) The script snippet runs inside a script that is run from the server with the if(!isServer) exit with {}; at the beginning. We were only 6 players on the server while experiencing those really bad lags. -
Hi, I have a trigger spawned from a script. Before the trigger I define a variable [color="#FF8040"]var_task [color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]publicVariable[/b][/color] [color="#7A7A7A"]"var_task"[/color][color="#8B3E2F"][b];[/b][/color][/color] after that I create the trigger [color="#FF8040"][color="#1874CD"]_trg[/color][color="#8B3E2F"][b]=[/b][/color][color="#191970"][b]createTrigger[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"EmptyDetector"[/color][color="#8B3E2F"][b],[/b][/color][color="#1874CD"]_random_pos[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_trg[/color] [color="#191970"][b]setTriggerArea[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#FF0000"]40[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]40[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_trg[/color] [color="#191970"][b]setTriggerActivation[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"EAST"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"NOT PRESENT"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_trg[/color] [color="#191970"][b]setTriggerStatements[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"this"[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"var_task = 1; publicVariable'var_task'"[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]""[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [/color] and directly after that comes [color="#FF8040"][color="#191970"][b]waitUntil[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]4[/color][color="#8B3E2F"][b];[/b][/color] var_task [color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color][/color] What should happen ist that the trigger should activate when no EAST unit is inside the defined trigger area. That works fine until I entered a helicopter. A few seconds after I startet the helicopter and took off, the var_task variable is magically set to 1 and everything after the waitUntil codeblock is executed. Don´t know why the trigger is triggered and set the variable. Any solutions?
-
Subtracting multidimensional arrays and multiplayer hint
commanderx posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Good morning, I have an array which is build like that. if(isNil"city_pos") then { city_pos = [[5095.67,11256,"Panochori",400,400]]; city_pos = [[3531.15,13117.6,"Kavala",400,800]] + city_pos; city_pos = [[3821.85,13692,"Aggelochori",400,400]] + city_pos; city_pos = [[19403.7,13248.6,"Dorida",400,400]] + city_pos; publicVariable "city_pos"; }; After that I select randomly one of those arrays. _random_city = city_pos call BIS_fnc_selectRandom; Everything works well but then I subtract the selected values from the array with city_pos = city_pos - _random_city; publicVariable "city_pos"; The file will be executed several times again but this doesn´t work. I still get all the elements from city_pos. I don´t know if the problem is the if(isNil"city_pos") or if the subtraction doesn´t work? Second problem is I execute a file with if(!isServer) exit with {}; at the beginning. Inside that files I need to execute hints that all players should be able to see. In Single Player everathing works fine but in Multiplayer not. Any ideas? Thanks in advance for helping me out. -
Subtracting multidimensional arrays and multiplayer hint
commanderx replied to commanderx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
After rereading the https://community.bistudio.com/wiki/Array#Subtraction site, it´s probably like Greenfist has mentioned earlier the city_pos = city_pos - [_random_city]; I knew this article but obviously didn´t read it carefully enough. Thanks @ Schatten for pointing that out. @ Greenfist. Thanks, I will do it this way then. Looks a lot better than mine :D EDIT: I will try yll your suggestions when I´m back at home. -
Subtracting multidimensional arrays and multiplayer hint
commanderx replied to commanderx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for helping me out! the call BIS_fnc_Mp command is great. Thanks. Yes, there is a lot more inside the script going on. It´s not easy to explain what I´m doing. Even in my native language (German) it would be not easy to explain it properly :D From the init.sqf I load a file where is decided which further script will be loaded. In this loaded script is a mission and at the end of this script the same file which is called from the init.sqf is loaded again and there again it will be decided which further script with a mission will be loaded. I thought the command if(isNil"city_pos") then { makes sure that the array will just set once? I thought if the script is called again the variable city_pos is set it won´t be executed again? I´m sorry for making probably noobish errors, making my first steps in scripting Arma :D Haha, you wrote if(isNil"city_pos") then //this is much better, faster, and makes a lot more sense when you read it is funny because I think that it´s much better readable for me because there are 30+ entries in the complete array. if(isNil"city_pos") then { city_pos = [[5095.67,11256,"Panochori",400,400]]; city_pos = [[3531.15,13117.6,"Kavala",400,800]] + city_pos; city_pos = [[3821.85,13692,"Aggelochori",400,400]] + city_pos; city_pos = [[8984.53,12042.3,"Zaros",400,800]] + city_pos; city_pos = [[10670.5,12266.4,"Therisa",400,400]] + city_pos; city_pos = [[10956.8,13441.1,"Poliakko",400,400]] + city_pos; city_pos = [[11721.3,13742.2,"Katalaki",400,400]] + city_pos; city_pos = [[12573.9,14353.5,"Neochori",400,400]] + city_pos; city_pos = [[12948.5,15069.5,"Stavros",400,400]] + city_pos; city_pos = [[12346.9,15683.8,"Lakka",400,400]] + city_pos; city_pos = [[11131.7,14561.5,"Alikampos",400,400]] + city_pos; city_pos = [[14488.2,17671.5,"Gravia",400,400]] + city_pos; city_pos = [[14042.6,18730.3,"Athira",500,500]] + city_pos; city_pos = [[9290.31,15861.3,"Agios Dionysios",500,300]] + city_pos; city_pos = [[7107.94,16439.3,"Kore",400,400]] + city_pos; city_pos = [[4871.94,16145.7,"Negades",400,400]] + city_pos; city_pos = [[8625,18285.6,"Syrta",400,400]] + city_pos; city_pos = [[16327.4,17221.7,"Telos",300,300]] + city_pos; city_pos = [[18109.9,15240.5,"Charkia",400,400]] + city_pos; city_pos = [[16812.1,12722.7,"Pyrgos",550,550]] + city_pos; city_pos = [[20791.6,6744.61,"Selakano",400,400]] + city_pos; city_pos = [[20964,16969.2,"Paros",400,400]] + city_pos; city_pos = [[21380.6,16368.5,"Kalochori",400,400]] + city_pos; city_pos = [[20246.8,11672.3,"Chalkeia",400,400]] + city_pos; city_pos = [[25696.5,21349.5,"Sofia",400,400]] + city_pos; city_pos = [[27044.4,23253.4,"Molos",400,400]] + city_pos; city_pos = [[18820.7,16601.9,"Rodopoli",400,400]] + city_pos; city_pos = [[10326.1,19076.7,"Galati",250,250]] + city_pos; city_pos = [[14643.9,20748.3,"Frini",400,400]] + city_pos; city_pos = [[16611.9,16093.5,"Anthrakia",400,400]] + city_pos; city_pos = [[19403.7,13248.6,"Dorida",400,400]] + city_pos; publicVariable "city_pos"; }; -
help with random mission and triggers
commanderx replied to Erwin23p's topic in ARMA 3 - MISSION EDITING & SCRIPTING
In your executed random mission file you need another []execVM "file.sqf"; -
help with random mission and triggers
commanderx replied to Erwin23p's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I put this in the init.sqf [] execVM "tasks\create_task.sqf"; in the create_tasks.sqf an array with filenames _mission_array = ["tasks\task1.sqf","tasks\task2.sqf","tasks\task3.sqf"] call BIS_fnc_selectRandom; [] execVM _mission_array; so it loads a random script where you can put your scripted mission. This is all from memory, hopefully this works as intended :D EDIT: and of course in front of the file if(!isServer) exitWith {}; -
help with random mission and triggers
commanderx replied to Erwin23p's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No _ in front of the variable. It must be a global variable. variables with an _ in front of the name is only accessible within a script. EDIT: Before I forget, if you run this in a multiplayerenvironment there must be in the init.sqf if (isServer) then {your_activation_variable = 0;}; otherwise it will be confusing and every client who connects will set the your_activation_variable to 0. -
help with random mission and triggers
commanderx replied to Erwin23p's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If you still would like to activate a trigger from a script make something like. - In your init.sqf write: your_activation_variable = 0; - Place the trigger - in the condition field write something like: your_activation_variable == 1; - in the script write to activate: your_activation_variable = 1; publicVariable "your_activation_variable"; After the script runs this line, your trigger should activate. -
Hi, is this still working? I tried to implement this in one of my missions. Everything worked but I get no notification when a task is completed, assigned or whatever. Am I doing something wrong or is it outdated because of an Arma update? Works now :-) Just added a briefing. Thanks for this great script!
-
CSSA3 - A Spectator Script for Arma 3
commanderx replied to cyrokrypto's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Great! Thanks for sharing!!! -
Create random waypoints on roads?
commanderx replied to commanderx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Got it, thank you :-) _marker = getmarkerpos "marker"; _list = _marker nearRoads 10500; //_mcount = 1; /*{ _pos = getpos _x; _Xpos = _pos select 0; _Ypos = _pos select 1; m_name = format["name%1",_mcount]; _markerstr = createMarker [m_name,[_Xpos,_Ypos]]; _markerstr setMarkerShape "ICON"; _markerstr setMarkerType "hd_dot"; //sleep 2; //silenthint format ["%1 Strassen gefunden",m_name ]; _mcount = _mcount + 1;} forEach _list; */ hintSilent format ["%1 Strassen gefunden",_list ]; _count = 1; while {_count < 50} do { _road = _list call BIS_fnc_selectRandom; _posroad = getPos _road; _Xpos = _posroad select 0; _Ypos = _posroad select 1; m_name = format["name%1",_count]; _markerstr = createMarker [m_name,[_Xpos,_Ypos]]; _markerstr setMarkerShape "ICON"; _markerstr setMarkerType "hd_dot"; _count = _count +1; }; -
Create random waypoints on roads?
commanderx replied to commanderx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Would be better to ask your question here http://forums.bistudio.com/showthread.php?72059-The-all-new-Ask-a-moderator-about-the-forum-amp-rules instead of hijacking my thread :D Good luck! -
Hm, I don´t get it. Can you give some example codes for the usage of this script?
-
Create random waypoints on roads?
commanderx replied to commanderx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am probably too stupid to use that script. Don´t have a clue how to put in the variables?? -
@Ares - Modules expanding Zeus functionality - Release Thread
commanderx replied to antonstruyk's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Hi Anton, didn´t know that and it was like Ares running and it happens, Ares not running and everything´s fine. Sorry for blaming @Ares. Upvoted as recommended. -
@Ares - Modules expanding Zeus functionality - Release Thread
commanderx replied to antonstruyk's topic in ARMA 3 - ADDONS & MODS: COMPLETE
I have problem creating compositions. I can place them on the map but when I try to shift the whole composition to somewhere else almost every object of the composition is a the same single postion. Any suggestion what I can do with that? If I disable @ares this behaviour doesn´t happen. -
How can I disable the laxemans soundscape in DragonFyre?
-
How To disable thermal monitors in Vehicles?
commanderx posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, I would like to disable the thermal monitors in vehicles. You can disable the the thermal sight easily with disableTIEquipment but the monitors are still showing the thermal image. Best regards Kai -
How To disable thermal monitors in Vehicles?
commanderx replied to commanderx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for all the help. I think I will wait until BIS will (hopefully) fix that problem. -
Loud is okay but clipping is not.
-
[WIP] CSSA3 - Cyro's Specator Script for ArmA 3
commanderx replied to cyrokrypto's topic in ARMA 3 - ADDONS & MODS: DISCUSSION
Hi, is this still in development? -
Authentic Gameplay Modification
commanderx replied to koffeinflummi's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Why not make a simple respawn delay in the description ext? respawnDelay = 10; Or if you want it somewhat sophisticated disable animation for 10 seconds or something like that in the onplayerrespawn.sqf -
How to assign a setvariable with params set
commanderx posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, I have the following problem. In my mission template I would like to make 3 teamleader able to perform AGM medic tasks with this setVariable ["AGM_IsMedic", true]; That works fine but furthermore I would like to make this dependable from what I choose at the beginning of the mission with a parameter. Also that should work while someone is joining with one of the teamleadslots while mission is in progress. So I have the variable _team_medic = paramsArray select 3 (in the init.sqf) but don´t know how to assign the setvariable command. Best regards Kai -
How to assign a setvariable with params set
commanderx replied to commanderx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Will something like this work? ["medic", "onPlayerConnected", { player setVariable ["AGM_IsMedic", true];}] call BIS_fnc_addStackedEventHandler;