Jump to content

leysard

Member
  • Content Count

    11
  • Joined

  • Last visited

  • Medals

Posts posted by leysard


  1. 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 ?


  2. 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;
    }
    


  3. 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;	
    


  4. 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


  5. 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.

    if (!isServer) exitwith {};

    if (Task != "done")

    then {Task = "tasks\Task.sqf";};

    if (Task_1 != "done")

    then {Task_1 = "tasks\Task_1.sqf";};

    if (Task_2 != "done")

    then {Task_2 = "tasks\Task_2.sqf";};

    if (Task_3 != "done")

    then {Task_3 = "tasks\Task_3.sqf";};

    if (Task != "done") then

    {Tasks = Task;};

    if (Task_1 != "done") then

    {Tasks = Tasks + Task_1;};

    if (Task_2 != "done") then

    {Tasks = Tasks + Task_2;};

    if (Task_3 != "done") then

    {Tasks = Tasks + Task_3;};

    SelectedTask = Tasks select (floor (random (count Tasks)));

    hint SelectedTask;


  6. 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 ?


  7. 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.

×