Jump to content

jshock

Member
  • Content Count

    3059
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by jshock


  1. Well, let's see, what is it supposed to do, since I can't read your code, and what is it not doing or not working? And it would be a plus if you could provide the area of the code that would more than likely handle the portion that isn't working, so I don't go crossed-eyed trying to find it.


  2. What might be a good idea, in parrellel to what Dreaded stated above, is to look for a number of devs willing to help out and get a short resume on what they have done scripting wise, and with that you should have a good idea as to what they can do, at this point you should be able to go to one of the devs in the pool and say "hey I need a building garrison function that allows x, y, and z" let that dev work on it, let them know of any global information that would be needed (i.e. an array of the units added via the function), and then have your "integrator" like Dreaded said above integrate the function into the whole system or if there seem to be issues report that back to the dev so they can fix it.

     

    So instead of limiting yourself to a single, 24/7, extra hand on the project, have 10 that are willing to help on a "one-off" basis.

    • Like 1

  3. Your script is requiring an argument to be passed when executed (which would be _this select 0):

    fnc_Gear2 =
    {
    	switch (_this select 1) do 
    	{
    		case "PL":{[(_this select 0)] call fnc_removeall;};
    		case "PL2":{[(_this select 0)] execVM "scripts\loadouts\PL2.sqf";};
    		case "PS":{[(_this select 0)] execVM "scripts\loadouts\PS.sqf";};
    		case "PS2":{[(_this select 0)] execVM "scripts\loadouts\PS2.sqf";};
    		case "FRO":{[(_this select 0)] execVM "scripts\loadouts\P22.sqf";};
    	};
    };
    
    • Like 1

  4. If you need to detect mutltiple keys pressed at the same time, consider this:

    when you press any key combination - EH fires for each key in order you pressed them. Multikey press means that KeyUp did not fire yet, when keydown for second key fired.

    So you may just have some kind of array variable in missionNamespace which tracks currently pressed keys.

     

    Yea that's the problem with this whole thing thus far is the shear number of possible inputs you have to look for, and each has its own challenges in checking to see if it has occurred or not.

     

    -Single key (number/character)

    -Single key (ctrl/shift/alt)

    -Two keys (number/character-ctrl/shift/alt)

    -Two keys (number/character-number/character)

    -Two keys (ctrl/shift/alt-ctrl/shift/alt)

    -Double tapped key

    -And probably some other combinations

     

    The nice thing (as far as I saw) is the custom user action bindings can only go up to two keys per binding.

     

    Note on implementation of aforementioned code, I haven't had a lot of time this week to test and what not, hopefully have something together by end of week, early next week.


  5. Sorry I couldn't assume the strength of your server, and as far as client vs server loads, I can't entirely answer you, but my best guess would be that in some way, even though things are handled on the client, everything at some point still has to be communicated to the server, so now instead of one object being broadcasted from the server to all the clients, there are now 100 objects being broadcasted to the server, a sort of bottleneck I guess. But that's my best educated guess, could be wrong/half right, I don't know.


  6. I would also recommend, if after you exhaust all your optimization options that there are still issues, start looking into a better server (even building your own). I've never been on a server with more than 70 people on it at one time, but I've seen a server with only 30 people on it that performs worse than a server with 60 just because of the server provider and the actual level of "dedication" you obtain from your provider.

    Moral of the story, if you can't upgrade the software, upgrade the hardware.


  7. switch (typeOf player) do
    {
    	case "B_Rifleman_F": {/*Loadout*/};
    	case "ClassName2": {/*Loadout*/};
    	case "ClassName3": {/*Loadout*/};
    	default {/*Default Loadout or Error Message*/};
    };
    
    

    Depending on the number of possibilities a switch will always be the better route, if you only have two, I would recommend using an if-else statement.

     

    A switch, in basic terms, says, take this particular variable and compare it to a number of different possible values for that variable, if one of the "cases" is true, run that code, if it isn't true for that case check the next, and so forth. And if you have a default case (as exampled above, and is highly recommended to always include one) the code within it will run if none of the aforementioned cases are true.

×