Jump to content

fencr0c

Member
  • Content Count

    46
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by fencr0c


  1. I had the same results with para-drops, found that in preview they remain attached to chutes, but when playing on dedicated some units are not attached to chutes. Instead what happened when playing on dedicated is that unit and chute reattached themselves once they hit the ground, unit was alive and continue to act normally after that, very odd.


  2. Assuming you know the location of the composition and the area it covers I've used the following in previous missions:

    _cmpObj=call(compile(preprocessFileLineNumbers format["compositions\%1.sqf",[b][i]name_of_composition_file_without_.sqf[/i][/b]));
    {
       {
               deleteVehicle _x;
       } forEach (nearestObjects[[b][i]location_of_composition[/i][/b],[_x select 0],[b][i]radius_of_composition[/b][/i]);
    } forEach _cmpObj;


  3. I have a mission were I’m spawning vehicles and units from add-ons using a server side script.

    As these vehicles/units aren’t placed in the editor, the add-on is not being added into mission.sqm (addOns[] and addOnsAuto[]). This of course means that players can join the mission without having the add-on causing some strange effects.

    I’d be interested in knowing how others deal with this?

    I was considering adding them into the mission using the editor with 0% probability to force the add-on to be lodged in the mission.sqm, interested in other methods or suggestions.


  4. Read on a couple of posts that the waitUntil command should not be used as it can degrade performance if there are lots of them.

    I think I understand the reason, as waitUntil is outside of the scheduling environment (hope that's correct).

    But what should I use instead, for example on a trigger?

    _trgBld=createTrigger["EmptyDetector",_loc];
    _trgBld setTriggerArea[1500,1500,0,false];
    _trgBld setTriggerActivation["WEST","PRESENT",false];
    waitUntil {triggerActivated _trgBld};
    

    Should the waitUntil be replaced by a while with a sleep?

    _trgBld=createTrigger["EmptyDetector",_loc];
    _trgBld setTriggerArea[1500,1500,0,false];
    _trgBld setTriggerActivation["WEST","PRESENT",false];
    //waitUntil {triggerActivated _trgBld};
    while {not triggerActivated _trgBld} do {sleep .3};


  5. When you say created on the server do you mean created by a script running on the server, cos I had the same problem recently.

    Got around it using setVehicleInit and processInitCommands

    Example:

    _vehInt=format["nul=this addAction [""Unload %1"",""fen_mission\supplytruck_unload.sqf"",[""%1"",""%2""]]",_vehCnt,_vehSqf];
    _vehObj setVehicleInit format["%1",_vehInt];
    processInitCommands;


  6. Think you'll find _marker1 is the object, UPSMON wants the marker name which in the example is "marker_%1", obviously substitued.

    Try

    _marker1Nam = format["marker_%1",floor(random 100)];
    _marker1 = createMarker format["%1", _marker1Nam],getPos _vehicname ];
    _marker1 setmarkershape "ELLIPSE";
    _marker1 setmarkersize [200,200];
    

    and pass _marker1Nam to UPSMON.


  7. Global variables are only global within the session where they are defined/changed.

    For example if you have a script running on the server session which sets variable "missionEnd=true", only scripts running on the server session will see that the variable has been created or changed. The same goes for player sessions, if you have a script running on all players connected and the script sets the variable on Tom's session, only scripts running on Tom's session will see the new value, players Dick and Harry and the server wont see the changed value.

    The publicVariable command broadcasts the variable and its last value across the network to all players and the server session. Another useful feature is that all publicVariables are broadcast to players joining a mission that's already started, effectivily ensuring players JIP get the current value of the variable.

    So to use public variable successfully you change the variable then use the publicvariable command to broadcast it to all players and the server.

    Or at least that my understanding of global variables and publicVariable.

×