Jump to content
IT07

[How-to] ArmA 3 Editor: Creating a JIP Proof COOP MP Mission Task Setup

Recommended Posts

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!

Share this post


Link to post
Share on other sites

Okay, Not sure I fully understand this, but I'm going to dive into this argument and see if this serves my purpose.

Thank you very much for directing me to your post IT07.

Share this post


Link to post
Share on other sites

Would you care to look at this simple example I'm working on ITO7 ?

What I said in the post is I do not know how to convert this to what I need it for, or I do not understand exactly what you are trying to achieve with your negotiations.

Share this post


Link to post
Share on other sites

Hey all, am considering attempting this for COOP missions. Anyone have success with JIP and COOP missions with more than 1 tasks?

Is this the easiest way or is there another way to allow JIPS with tasks etc?

I have a JIP script to spawn on TL however with tasks uncertain on weather I want to attempt this or just let the late players have to wait.

Is it worth the time to learn?

Share this post


Link to post
Share on other sites

I personally use the BIS_fnc_setTask and the BIS_fnc_taskSetState to accomplish multiple tasks, and then it's just about JIP checks or BIS_fnc_MP to get all players and JIPs the tasks.

Share this post


Link to post
Share on other sites

Trash the JIP scripts. PublicVariable method works the best as described in my post here.

Share this post


Link to post
Share on other sites
I personally use the BIS_fnc_setTask and the BIS_fnc_taskSetState to accomplish multiple tasks, and then it's just about JIP checks or BIS_fnc_MP to get all players and JIPs the tasks.

Hey Jshock, would you mind send me an example of your task setup so I could see how to properly setup. thanks

Share this post


Link to post
Share on other sites

So I need to add a JIP to my mission. It has several MP tasks, oh say 30. So I am wondering what the best way to approach something like this would be. I have a JIP script that is a bit buggy. I will have to dig it up and review it. BUT wondering if there is something else that would be easier to use.

In this mission you can be either Blufor or Ind and have players on both sides working together same time COOP. All objectives have conditions to end tasks.

Edited by JAndrews1

Share this post


Link to post
Share on other sites
So I need to add a JIP to my mission. It has several MP tasks, oh say 30. So I am wondering what the best way to approach something like this would be. I have a JIP script that is a bit buggy. I will have to dig it up and review it. BUT wondering if there is something else that would be easier to use.

In this mission you can be either Blufor or Ind and have players on both sides working together same time COOP. All objectives have conditions to end tasks.

In the examples that I have PMed you with (using BIS_fnc_setTask), you should see WEST somewhere in there, just replace that with "true", and that will make that task available to all playable units.

Share this post


Link to post
Share on other sites
SHK taskmaster also works great :)

that is does and it handles the JIP very well.

IT07 has a good sample here too for those that want to do it all within the editor. Not everyone wants to script their missions.

Share this post


Link to post
Share on other sites
In the examples that I have PMed you with (using BIS_fnc_setTask), you should see WEST somewhere in there, just replace that with "true", and that will make that task available to all playable units.

ok. I will go back and review the posts. I will also review using BIS_fnc_setTask and see what I kind of mess I get in.

[["task", "Succeeded"],"BIS_fnc_taskSetState", true, true] call BIS_fnc_MP;

Share this post


Link to post
Share on other sites

Hi there & sorry to resurrect, but can anyone confirm they got IT07's trigger magic to work recently? I'm on 1.62 stable and tried to make it work with a persistent ALiVE mission, but failed miserably...

 

The first tasks are to meet 3 different officers that then give you tasks to destroy stuff or kill HVT's.  My setup is like this:

 

1) Meeting triggers for the officers:

 

Type:none

 

Activation:anybody

 

Activation type:present

 

Condition: this && guer_boss in thislist && adlerauge_1 in thislist or adlerauge_2 in thislist; (names are obviously those of the AI officer and the two playable slots)

 

OnActivation: if (isNil "meeting_guer") then { meeting_guer = true; publicVariable"meeting_guer"; };

 

2) JIP check triggers for the meeting or killing/destroying tasks (synced to the task state module that sets the task as succeeded which is then synced to the task creation module)

 

Type: none

 

Activation: anybody

 

Activation Type: detected by BLUFOR

 

Condition: !(isNil "meeting_guer");

 

3) Checking triggers for HVT or Building

 

Type: none

 

Activation: none

 

Activation Type: none

 

Condition: !alive sep_boss;

 

OnActivation: if (isNil "killed_sep_boss") then { killed_sep_boss = true; publicVariable"killed_sep_boss"; };

 

Does anyone spot a mistake here? Thanks in advance for any help!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×