Jump to content
Sign in to follow this  
daredbarn

Question about modifying the LK script pack....

Recommended Posts

Hi,

Does anyone have any experience with the script pack by Lucilk?

A couple of us are trying to modify it a little bit. Currently it works by using it as a Commander, but we are trying to make is for use available to everyone on the server. I have been able to make the scripts run on everyone by changing all the "lkcom" call functions over to "player". The issue I am running into is that the scripts seem to tie all players togeather. Meaning if one client creates an FOB, not only is the add actions menu added to the person creating the FOB, but all other clients on the server. This is somewhat okay, but another player creating a second FOB on the server screws up the first one. My scripting skills are really elementry, but I am assuming that the server cannot differentiate between different players so it's trying the scripts to all the cleints on the server as a whole instead of allowing each client to activate the scripts independently of the other clients. I am betting that I am doing something incorrectly, I just don't know how to fix it. Right now the init mission file defines everyone in server that is "player" and runs the LK com script on them. Is there any was of insuring that the script is run independently by clients and they do not clash with one another. Is me using the "player" command screwing things up? Do I need to use eventhandlers? I am lost. I am also runnign into issues of certain features not showing back up after respawn like they should, but I figure one problem at a time at this point.

Here is the init file I am currently working with.

if ( (!isServer) && (player != player) ) then
{
waitUntil {player == player};
waitUntil {time > 10};
};
if !(isnull player) then {
if (playerSide == west) then {nul = [] execVM "lk\var\lkcom_init.sqf";
nul = [] execVM "lk\var\server_init.sqf"};

and here is the lk com init

nul = player execVM "lk\menu\close_menu.sqf";
player addeventhandler ["Killed", {_this execVM "lk\var\lkcom_respawn.sqf"}]

and LK server init

createcenter sidelogic;
_grp = creategroup sidelogic;


coin = _grp createunit ["ConstructionManager", [0,0,1],[], 0,"none"];
nul = [coin] execVM "lk\fob\coin.sqf";

UAVmod = _grp createunit ["UAVManager", [0,0,1],[], 0,"none"];
UAVmod setvariable ["name","RQ-1 Predator"];
UAVmod setvariable ["rules",[West]];

SOM = _grp createunit ["SecOpManager", [0,0,1],[], 0,"none"];
SOM synchronizeObjectsAdd [west];
SOM setvariable ["rules",[west]];
SOM setVariable ["settings", [[], true, nil, nil, false]];
execVM "lk\oth\somsettings.sqf";

HC = _grp createunit ["HighCommand",position west,[],0,"none"];
HCs = _grp createunit ["HighCommandSubordinate",position west,[],0,"none"];
HCs synchronizeObjectsAdd [HC];
HC synchronizeObjectsAdd [West];

if (player == West) then {hint "LK Script Pack v0.8"};

fob = false;

setPitchBank = compile preprocessfile "lk\oth\setPitchBank.sqf";

Share this post


Link to post
Share on other sites

i know what you mean... :D, well the entire script pack was designed to be just for 1 player.... the commander, beacuse of noobs in MP and messing up all that is fun so changing it to be executed on all clients, you need to change all reference from "lkcom" to player and everyone must have eventhandlers of their own and also all variables needs to be checked, i dont think it will be easy, but possible?... yes

Share this post


Link to post
Share on other sites
i know what you mean... :D, well the entire script pack was designed to be just for 1 player.... the commander, beacuse of noobs in MP and messing up all that is fun so changing it to be executed on all clients, you need to change all reference from "lkcom" to player and everyone must have eventhandlers of their own and also all variables needs to be checked, i dont think it will be easy, but possible?... yes

Thanks for the reply...

I did a little digging, and saw that all the variables were predefined as true or false in the init file. So yeah, the variable check would have to be done to verify conditions. Big issue, I have no idea how to do all that. :D I'm scripting stupid when it comes to eventhandlers as well. :D But that's okay, was fun trying.

Share this post


Link to post
Share on other sites

i dont think you want my script pack to be available to all co-op players as is intendet to be for 1 single man, the commander or a single player mission, i dont think you want everyone to drop nuclear bombs all over the map, and belive me that is not funny, if you want something for co-op players you can try Alpha commander script in my signature.

Good luck

Share this post


Link to post
Share on other sites
i dont think you want my script pack to be available to all co-op players as is intendet to be for 1 single man, the commander or a single player mission, i dont think you want everyone to drop nuclear bombs all over the map, and belive me that is not funny, if you want something for co-op players you can try Alpha commander script in my signature.

Good luck

Our intention was to basically only enable the smaller things like paratroopers and the FOB, things like that. We were definetly not planning on giving anyone the keys to the nukes. :D

I will see what the alpha commander scripts is all about though, thanks.

And thanks for the work you have put out there so far, before I forget to mention it. :)

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
Sign in to follow this  

×