OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: L!nk on 16 Apr 2008, 16:46:56

Title: What to keep in mind with JIP???
Post by: L!nk on 16 Apr 2008, 16:46:56
Ok, I made a mission that works perfectly, except for JIP.

What do I have to do when I want to add JIP to the mission.

Imagine this is my init.sqf
Code: [Select]
if !(local Server_Logic) then {[]execVM "client\client_init.sqf"};
if (local Server_Logic) then {[]execVM "server\server_init.sqf"};

In server_init.sqf is alot of publicVariables that change as the mission progress
In client_init.sqf is the players unique variables that change as the mission progress

1.What do I have to do with the these player that join. Just send them to client_init.sqf?
Code: [Select]
onPlayerConnect "[]execVM ""client\client_init.sqf"""; // ?????

2.What do I have to do with the players that disconnect? Will the AI automatically replace them? How do I tell that AI to continue with normal AI unit behaviour?

3.What variables change before/during/after a player played?

4.Is there maybe someone I can send my mission to so he/she can implement a JIP script?
Title: Re: What to keep in mind with JIP???
Post by: Rommel92 on 17 Apr 2008, 01:04:12
Code: [Select]
if (isServer) then
{
//SERVER
[] execVM "server\server_init.sqf";

if (!(isNull player)) then
{
//SERVER-CLIENT
[] execVM "client\client_init.sqf";
};
}
else
{
//CLIENT - JIP
waitUntil {!(isNull player)};
[] execVM "client\client_init.sqf";
};

Allows for JIP and the initial players to execute the script, just dump that in your 'init.sqf' and you're rocking.
Title: Re: What to keep in mind with JIP???
Post by: L!nk on 17 Apr 2008, 20:07:19
Great!

Quick and easy...

thx,
L!nk