Jump to content

jshock

Member
  • Content Count

    3059
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by jshock


  1. Hello,

    I suppose you could accomplish this with the RopeBreak eventhandler

    Nikander

    I made a script very similar to this a long time ago, using the above EH, however, firstly, I cannot find it atm (figures), secondly, there are multiple ropes attached to the box (4 if I remeber), therefore, the EH will execute 4 times, so you need to be sure to execute your code only once out of those four times or else it will spawn 3 extra parachutes :).

  2. No, it's always recommended to put as much weight on the server as possible because with the diversity of computers for all the players, you need to make the assumption that not everyone has a beastly computer. Hopefully, you know the specs for the server, or can easily find out, but the more on the server (or headless client, which is highly recommended) the better, if you bottleneck a server with your code it's safe to assume it would do the same on each client, if your code is done properly with enough care there should be no issues adding weight on the server.

    There was a similar thread and discussion as far as using createVehicle vs createVehicleLocal (executed across all clients), but I'm on my phone and cannot properly link it.


  3. 1-9 are all correct.

    createVehicle is an "effects global" command, which means that it doesn't matter where it is executed it will be synced across all clients (including the server), that is why when using createVehicle/Unit or similar commands it is recommended to run them either solely on the server or on a headless client if avialble, avoiding duplications based on number of clients currently connected.

    https://community.bistudio.com/wiki/createVehicle_array

    You can see the "EG" at the top left of the page of the command, E = effect, G = global. Similarly with other commands you will see A, which is "arguments", and L, meaning local.

    The hint command is EL, effects local, meaning just as you stated above, only the executing machine will see it, or run the "effect":

    https://community.bistudio.com/wiki/hint


  4. But with that aside, the BIKI being a community project, VBS 3.0 the Australian Fork off Bohemia, get a regularly updating manual. (ArmA 3 sucks :( )

     

    The community really should put together a "scripting manual" that can be updated regularly..

    https://bisimulations.com/support/manuals

    Hopefully you realize that VBS is a real, military training simulation, not the civilian sector equivalent, so yes, I'm sure they will support a manual for that, and even if they don't "truely" keep that manual up-to-date as BIS, I'm sure they have the weight of military personnel (that follow any orders given) to help keep those manuals updated.

    And again I state the same thing I did in your other thread, looks like you've got some work to do, you are technically apart of this community, so if you feel something needs to be done or contributed, get it done. I'm sure there are people here willing to assist, should you be willing to take others' input.


  5. OK, I kind of expected that. I disagree with the idea that this kind of function is somehow less efficient. The game processes this code in exactly the same way as it processes functions split into dedicated files. This isn't like C++ where making a function inline actually changes the way it is compiled. At the end of the day, it's all just interpreted SQF code anyway. 

    I remember a similar conversation/thread on this subject from a long time ago, I don't remember exactly what was said as to why one would be better than the other (or even if it was worth taking the time to choose), but at least as far as I'm concerned it comes down to the script author's preference with inline vs file functions.


  6. Okay can someone better elaborate the differences between params and private?

    Params is better used in a script/function that takes input values (parameters), private is better used when (austin's explanation is better). I believe that params also privatizes those variables, so you don't have to params it then private the same variables.


  7. params allows you to.

    1. define Default values

    2. Value type checking before data is passed to it such as expected data types

    3. Expected array size, and expected entries

    Pretty sure BIS_fnc_param provides those three as well, params is just provided as a scripting command which inherently is more optimized than an external function (therefore making the function version obsolete).

     

    Hmm, yea looky here: https://community.bistudio.com/wiki/BIS_fnc_param


  8. total_count = 0;
    publicVariable "total_count";
    
    fn_callFunction =
    {
    	total_count = total_count + 1;
    	publicVariable "total_count";
    	str(total_count) remoteExec ["hint",0,false];
    };
    
    

    Assuming you want every player to see the hint after each increment, if no, simply do:

    hint str(total_count);//in place of remoteExec line
    • Like 1
×