Jump to content

FoxClubNiner

Member
  • Content Count

    30
  • Joined

  • Last visited

  • Medals

Posts posted by FoxClubNiner


  1. Here is my issue. Players that JIP (join in progress) can mess up the mission because they spawn with access to an addAction that was removed for players that were in the server since the start of the mission.
     

    The following code works perfect and does what I need it to. It even works when JIP players execute it. I just don't want them to have access to the addAction because they can disrupt the flow of the mission with it.

     

    With the help of some people on discord and here, I have written an addAction that executes a .sqf that changes weather, time of day, and a few other things. Here is the addAction:
     

    MPScriptGlobal = player addAction ["MP Script Global", {["MPglobal.sqf"] remoteExec ["execVM", 0];}, [], 8, false, true];

    The above addAction executes this .sqf:

     

    player removeAction MPScriptGlobal; //removes the addAction for players
    
    call{playsound "wait1"}; //plays radio message below
    player sideChat "Razorback, HQ. We're in position and waiting for the patrol. Over."; //subtitles for radio message
    sleep 7;
    call{playsound "wait2"};
    sleep 1;
    HQRadio sideChat "HQ, Razorback. Good copy. Don't let the bugs get you. Over and out.";
    sleep 6;
    
    titleText ["", "BLACK OUT", 3]; //fades screen to black
    3 fadesound 0; //fades audio to mute
    sleep 5;
    
    NavalPatrolvariableActivated = true; //activates trigger to unhide patrol
    
    skipTime -24; //rewinds time to addjust overcast
    86400 setOvercast .5; //sets the overcast
    skipTime 24; //advances time to allow engine to create overcast
    0 setRain .40; //sets rain
    0 setFog [1, .20, 5]; //sets fog
    setDate [1967, 3, 31, 5, 57]; //sets time of day
    
    3 fadesound 1;
    sleep 2;
    
    titleText ["", "BLACK IN", 3];
    sleep 3;
    [] Spawn {
    [ 
     [ 
      ["Recon Position", "<t align = 'center' shadow = '1' size = '1.5' font='tt2020style_e_vn_bold'>%1</t><br/>"],  
      ["0557h", "<t align = 'center' shadow = '1' size = '1.0'>%1</t><br/>"]
     ] 
    ] spawn vn_ms_fnc_sfx_typeText;}; //type text appears on screen
    
    600 setOvercast .25; //sets overcast to be completed after 5 minutes

    I have received some advice on discord that "It would be way easier if you would just use a global variable for a action condition and publicvariable it to disable the action." But I don't know exactly how to implement this. Another person was saying to create a initServer file and put some variable in there. Problem is I'm so new I really need this spelled out for me. I've messed around for hours trying different stuff but I think I'm just digging myself a hole. But I'm not giving up!

    • Like 1

  2. So I'm pretty close to getting this working. Originally I had:
     

    0 setFog [1, .20, 5];

    I like this because you can control the height of the fog with the numbers ".20 and 5" but this wont execute on my dedicated server so I changed it to this:
     

    [0, 1] remoteExec ["setFog",0];

    This works as intended except I don't have those extra numbers to fine tune the fog height. So I tried this:
     

    [0, 1, .20, 5] remoteExec ["setFog",0];

    But this way disables the fog so something isn't correct. Any ideas how to integrate the additional parameters?


  3. Any ideas how to remoteExec this? Currently it just plays on the local machine that activates it. I am trying to get this working in a dedicated server environment.
     

    Quote

    [] Spawn {
    [
     [
      ["Recon Position", "<t align = 'center' shadow = '1' size = '1.5' font='tt2020style_e_vn_bold'>%1</t><br/>"],  
      ["0557h", "<t align = 'center' shadow = '1' size = '1.0'>%1</t><br/>"]
     ]
    ] spawn vn_ms_fnc_sfx_typeText;};

     

×