Home   Help Search Login Register  

Author Topic: What to keep in mind with JIP???  (Read 1417 times)

0 Members and 1 Guest are viewing this topic.

Offline L!nk

  • Members
  • *
What to keep in mind with JIP???
« 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?
« Last Edit: 16 Apr 2008, 16:48:57 by L!nk »

Offline Rommel92

  • Members
  • *
Re: What to keep in mind with JIP???
« Reply #1 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.
« Last Edit: 17 Apr 2008, 01:08:00 by Rommel92 »

Offline L!nk

  • Members
  • *
Re: What to keep in mind with JIP???
« Reply #2 on: 17 Apr 2008, 20:07:19 »
Great!

Quick and easy...

thx,
L!nk