Jump to content

IT07

Member
  • Content Count

    345
  • Joined

  • Last visited

  • Medals

Posts posted by IT07


  1. To answer your question: yes and no.

    Why yes? If you want to add a vehicle that has the abilities you want, you can make a mod and add it. Problem is though that players without the mod can either join and not see it, or not join because they don't have the mod.

    Why no? You can not change an existing vehicle with a new hpp file. You need to modify the existing hpp if you want to change existing vehicle.


  2. I will do the same :) Would be fun to see what we both come up with ;)

    ---------- Post added at 12:58 ---------- Previous post was at 12:47 ----------

    I will give you a headstart xD

    here is the code that you will need in order for the lights to show up. just wrap an addaction around it. should work.

    Also try and find the executor of this script. Maybe some keyDown thing somewhere in a compile sqf.

    /*
    File: fn_sirenLights.sqf
    Author: Bryan "Tonic" Boardwine
    
    Description:
    Lets play a game! Can you guess what it does? I have faith in you, if you can't
    then you have failed me and therefor I lose all faith in humanity.. No pressure.
    */
    private["_vehicle"];
    _vehicle = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
    if(isNull _vehicle) exitWith {}; //Bad entry!
    if(!(typeOf _vehicle in ["C_Offroad_01_F","B_MRAP_01_F","C_SUV_01_F"])) exitWith {}; //Last chance check to prevent something from defying humanity and creating a monster.
    
    _trueorfalse = _vehicle getVariable["lights",FALSE];
    
    if(_trueorfalse) then {
    _vehicle setVariable["lights",FALSE,TRUE];
    } else {
    _vehicle setVariable["lights",TRUE,TRUE];
    [[_vehicle,0.22],"life_fnc_copLights",true,false] call life_fnc_MP;
    };


  3. How to:



    Create a JIP Proof COOP MP Task Setup using the ArmA 3 Editor

    In this tutorial you will learn how to make a mission with tasks that work for everyone in multiplayer regardless of being a JIP Player or not.

    (JIP means Joined In Progress)

    The example shown here will show you how to make a task for taking a vehicle.

    1st step: Prepare the JIP Proof trigger.

    Create a trigger detected by BLUFOR. Set the presence to "ONCE", Change the axis values from 50 to 0, and put this in the condition:

    !(isNil "VehicleTaken");
    

    What that ^^^^ does: it checks if the public variable (https://community.bistudio.com/wiki/publicVariable) called "VehicleTaken" has been defined.

    CAUTION: do not confuse !(isNil) with (isNil). Because it is a big difference: !(isNil) checks if the variable EXISTS, and (isNil) checks if the variable does NOT exist.

    By default, the variable does not exist. But it will exist when a script executes the code below;

    VehicleTaken = true; publicVariable"VehicleTaken";
    

    What we have so far: A JIP trigger.

    2nd step: Setup the check for player taking vehicle.

    Create another trigger same as in step 1. This time, put this in the condition:

    player in VehicleToTake;
    

    Now put this in the ON ACT of the trigger:

    if (isNil "VehicleTaken") then { VehicleTaken = true; publicVariable"VehicleTaken"; };
    

    What the code above does: 1st checks if the VehicleTaken variable has already been submitted. If not, submit it.

    off topic: Why the isNil you may think? Well, if the variable is already executed there is no need to send the variable to all clients again. Because that is what the command publicVariable"VehicleTaken"; does. It tells all other computers connected to the network to take and store the variable.

    If we do not put the isNil there, another player getting into the vehicle after another player will send the VehicleTaken variable again. Then, everyone will see a task completed message again on their screen xD Their is also another way to do the same. But it is not needed. The benefit is too small unless you have like 50 vehicles with this setup in the same mission.

    On-topic: When the trigger fires, the VehicleTaken variable will be set so the trigger that has !(isNil "VehicleTaken"); will become active.

    3rd step: Create the vehicle that needs to be taken.

    Place a vehicle. Does not matter what it is. As long as it is a vehicle that a player can get into.

    In the name field of that vehicle, put this:

    VehicleToTake
    

    What we have so far: A trigger for the task completion, a trigger that checks if player took vehicle and the vehicle that has to be taken.

    4th step: Creating the tasks.

    Place a "task create" module using the categories: "Intel" and "Create Task".

    Read carefully now: the create task module needs a title ID. I have experienced that when it does not have it, it won't work.

    Also, the OWNER is very important: set it to BLUFOR if you want the task to be assigned to BLUFOR units.

    Go ahead and give it a title and description too. The description will be visible for the player on his/her map in the "tasks" section.

    Now place a "set task state" module using the categories: "Intel" and "Set Task State".

    Now, select the synchronise function, then click + drag your mouse from the trigger --that has the !(isNil "VehicleTaken"); in it's condition-- to the Set Task State Module.

    5th step: (optional) Mission successful if vehicle taken.

    Now we create a module that will give a nice outro saying "mission completed" once the vehicle was taken:

    Click on Modules > Scenario flow > mission completed/successful and press ok.

    That will create a module that whenever it becomes active, it will show mission completed on everyone their screen.

    Now, select synchronise and click + drag your mouse from the trigger --that has the !(isNil "VehicleTaken"); in it's condition-- to the mission completed module.

    What we have so far: a JIP Proof COOP/MP Task setup :) Have fun with mission making!

×