Jump to content

leysard

Member
  • Content Count

    11
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About leysard

  • Rank
    Private First Class
  1. Anyway, thanks Das Attorney for taking the time to help. I'm still awaiting second part of my question to finish the script. Maybe a kind of "for each" to use Inside of the waituntil ?
  2. Ok Na_Palm, your solution works I would like to add the next condition before considering the Task as Succeded. Of course, I would like it to be also automated with the previous part of script. waitUntil {(markerColor "_MarkerZone0" == "ColorGreen") and (markerColor "_MarkerZone1" == "ColorGreen") and (markerColor "_MarkerZone2" == "ColorGreen")}; Das Attorney, what would be the "problematic" with using global variables instead of local ones ?
  3. OOps, that's a mistake I forgot to take out. So even without that, the script does only creates 1 square. In my example, should produce 3. (By the way, edited my initial post to take out the slect mistake.
  4. Hello, I wanted to write a script for making red/green zones without having to take hundreds of lines. My idea was to give coordinates in an array and then select these coordinates as long as there are some to set the zones. Obviously, it's not working and that where I would appreciate some help _zones = [[20650,6850],[20750,6850],[20850,6850]]; // Define 3 zones to create _zoneAmount = count _zones; //Count the number of zones _zoneTodo=0; while {_zoneTodo<_zoneAmount} do //creates zones as long as there are still zones to create { _MarkerZone = "_MarkerZone" + str(_zoneTodo); _TriggerGreenZone ="_TriggerGreenZone" + str(_zoneTodo); _TriggerRedZone ="_TriggerRedZone" + str(_zoneTodo); _MarkerZone = createMarker ["_MarkerZone", [((_zones select _zoneTodo)select 0),((_zones select _zoneTodo)select 1)]]; _MarkerZone setMarkerShape "RECTANGLE"; _MarkerZone setMarkerSize [50,50]; _TriggerGreenZone =createTrigger ["EmptyDetector", [((_zones select _zoneTodo)select 0),((_zones select _zoneTodo)select 1)]]; _TriggerGreenZone setTriggerArea [50,50,0,true]; _TriggerGreenZone setTriggerActivation ["WEST SEIZED", "PRESENT", true]; _TriggerGreenZone setTriggerStatements ["this", "'_MarkerZone' setMarkercolor 'colorGreen';",""]; _TriggerRedZone =createTrigger ["EmptyDetector", [((_zones select _zoneTodo)select 0),((_zones select _zoneTodo)select 1)]]; _TriggerRedZone setTriggerArea [50,50,0,true]; _TriggerRedZone setTriggerActivation ["EAST SEIZED", "PRESENT", true]; _TriggerRedZone setTriggerStatements ["this", "'_MarkerZone' setMarkercolor 'colorRed';",""]; _zoneTodo = _zoneTodo + 1; sleep 0.05; }
  5. I'm trying to pass some values from on sqf file to another. I can't find my mistake. Here's the initial file heliGrp = createGroup west; heli1 = "B_Heli_Light_01_F" createVehicle ([21704,7571]); heli1 setVehicleVarName "heli_1"; heliGrp addVehicle heli_1; null = ["heliGrp","heli1"] execVM "Scripts\fillVehicle.sqf"; Then here is the fillVehicle.sqf script. It does not spawn the unit and get into the heli sleep 1; _heliGrp = _this select 0; _heliname = _this select 1; sleep 1; FS1 = "B_Soldier_A_F" createUnit [[18405,6724], _heliGrp, "FS_1 = this",0.5, "LIEUTENANT"]; FS_1 moveInDriver _heliname;
  6. Hy, I'm buiding my first scripted mission and when I'm in Multiplayer and I serve the mission, the following task comes twice in my map. Could someone help me out to find the mistake ? By the way, the _MissionMessage does only come once on my screen and in over players screen. if (!isServer) exitwith {}; { Task_2Data = player createsimpletask ["Task_2"]; Task_2Data setsimpletaskdescription [_Task_2Description, _Task_2Title, _Task_2Destination]; Task_2Data setsimpletaskdestination [_Task_2Gridx,_Task_2Gridy]; Task_2Data settaskstate "Created"; Task_2Mark = createMarker ["Task_2Mark", [_Task_2Gridx,_Task_2Gridy]]; Task_2Mark setMarkerShape "ICON"; "Task_2Mark" setMarkerType "selector_selectedMission"; "Task_2Mark" setMarkerColor "ColorBlue"; "Task_2Mark" setMarkerText _Task_2Title; playSound "Newtask"; _MissionMessage = " <t color='#2159D1' size='1.6' shadow='1' shadowColor='#000000' align='center'> Kill the informant !</t><br/><br/> <t color='#FFF700' size='1.3' shadow='1' shadowColor='#000000' align='center'> Kill the informant before he send's out information about our operations !</t><br/><br/> <t color='#EEEEEE' size='1' shadow='1' shadowColor='#000000' align='center'>Check your tasks for more information</t><br/><br/>"; GlobalHint = _MissionMessage; publicVariable "GlobalHint"; hintsilent parseText _MissionMessage; } forEach (if ismultiplayer then {playableunits} else {switchableunits}); Thanks in advance for the help
  7. Zenophon, Thank you very much for your help, the random Task selector now works perfectly. Regarding the "done" of the global variables, I'm now going to look either to put them in triggers in mission or if i'm going to script them. I'm planning on creating 1 .sqf file per mission/task, that will be called by triggers or by script going to the random file. Again thanks for the help
  8. So, I've been trying several different things to get all that working. I would like to learn to use correctly Arma 3 Scripting and must recognize that I've got a long way to go. I had my own try to creating a script that I can call when I want with a trigger for example. But, obviously, it does not work. So, here it is and please, could someone help me make that one work ? At this point, I just want to be able to randomly select a task in my array. I get the error message at the count point. Later, I will use the selected task to open a file with the scripted task.
  9. Kylania, Sorry, yes I did search, but not found what I was looking for. Thats the reason of my post. Zenophon, Thanks for your help, but even if removing line, it does not work. Always goes on to task4 and never moves on to next one. Maybe I'm wrong with the way I built my mission. PM'd the zip file of it so that you could have a look. I would really appreciate. Thanks, Leysard
  10. Hy, I want to assign tasks randomly to a team (Multiplayer). Say that task 00 starts at the beginning of mission. When task 00 is finisched, I want to assign to all players a task between task N° 1 to N° 4. Then when that task is succeeded, assign random task not succeeded out of the 3 left, then again then again and that makes all 4 tasks finisched but in different order from one time to another. I did not find a script and complete explanation to manage that. Can someone help me out ?
  11. leysard

    JIP build array

    Hy, I've enjoyed playing in missions using your EOS system. I've tried to use it in 1 of my new mission but I always get an error message of undefinded variable for the EOSMarker on line 9 of EOSGearBox (using v18). Do you know what I mabe did wrong cause I did not find a solution to solve the problem. Thanks for your help.
×