Jump to content

FoxClubNiner

Member
  • Content Count

    30
  • Joined

  • Last visited

  • Medals

Posts posted by FoxClubNiner


  1. Thanks for the fantastic information everyone!

    Indeed I will gate this action until the mission is almost over. Basically it becomes available to players if they don't want to wait out the 3 minute helicopter ride back to base and receive their mission debrief, which is just some sidechat I wrote. But for all intents and purposes the mission is already over at that point.


  2. 5 hours ago, gc8 said:

    if you want the simplest approach you can just do:


     

    
    // In client:
    
    createTheMisEndingAction =
    {
    
    player addAction ["End Mission", {["end1", true , 3, true, true, true] call VN_fnc_endMission;}, nil, 7, false, true, "", ""];
    
    };
    
    
    
    // Then in server:
    
    
    remoteExec ["createTheMisEndingAction ", 0];
    
    

     

    didnt check your code for typos

     

    you might want to change 0 to clients only (0 means everyone including server)

     

    HTH

     


    I'd like to try implementing this. Can you clarify what it means by "In Client" and "In Server"? At first I thought maybe it means initPlayerLocal and initServer but now I'm unsure.


  3. I stayed up way too late last night trying to get this to work. Quite simply I am trying to remoteExec a end mission function through an addAction. The idea being that any client can end the mission for everybody when they choose.  I have the addAction already written and tested fine:
     

    player addAction ["End Mission", {["end1", true , 3, true, true, true] call VN_fnc_endMission;}, nil, 7, false, true, "", ""];

    But since an addAction has a local effect only this only activates on the client that executes it. So that means I need to remoteExec it. The problem is I don't quite know how to order the text. I've tried a few things but I get errors when I do. Here is an example of one I tried that didn't do anything:

    Quote
    
    [{player addAction ["End Mission", {["end1", true , true, true, true] call VN_fnc_endMission;}, nil, 7, false, true, "", ""]}] remoteExec ["call", 0];

     


     


  4. 59 minutes ago, mrcurry said:

     

    After a solid 2,5 hours of testing I'm pretty sure this is a very niche bug with setUnitLoadout that we've stumbled across...

    From my tests it only happens under these circumstances:

    1. The player is in a vehicle
    2. setUnitLoadout is applied to the player
    3. The player disconnects before leaving the vehicle, switching seats does not avoid the issue.
    4. The server and mission is configured so AI takes over the player unit (disabledAI = 0;)

    The symptom seems to always to be that the uniform and vest disappears. It'd be interesting to see what other players see... when exactly does the uniform and vest actually disappear?

    I've disabled everything else custom in the mission, including your script Pierre and it still happens.

     

    So yeah I wouldn't bet my life on it but it looks like super niche issue that just happens to line up perfectly with your script Pierre and @FoxClubNiner's requirements... Well done! 😄

     

    It should be posted to the bug tracker if it isn't already... but I wouldn't hold my breath for a fix anytime soon.


    Incredible if true! I havent retried your script yet. I just got done taking 5 hours to get a freaking helicopter to land. I need a break lol. But I should be able to retry it tomorrow!


  5. Okay after messing around for a few hours I figured it out. It isn't the hold way points that are the problem on dedicated servers. It's how I was deleting them to progress the way points. That works fine in SP but on dedicated it wont work. What you have to do is setup a SkipWaypoint trigger. I used a variable in the condition: PickUsUpVariable; And in my addAction I set the variable to true.

    Can I take a moment to vent? Why does everything have to break on a dedicated server?? It's so frustrating having something work in the editor only to find out you need to do hours of diagnosis to get it working on a dedicated server. Ugh.

    • Like 1

  6. Are there known compatibility issues with a dedicated server and waypoints? I'm having an issue getting a helicopter to land (works fine in the editor). Here's the setup:


    1. Helicopter has a hold waypoint.

    2. Players enter trigger zone that removes the hold waypoint with:

    deleteWaypoint [group heli, 1];

    3. Helicopter flies to invisible helipad but wont land.


    However, oddly enough if I remove the hold waypoint from the mission alltogether, the helicopter has no problem landing on the server.  Something about the hold waypoint breaks it. Is there a way I could script this hold waypoint maybe? Or maybe I could use somesort of script that freezes the unit in place until I need it?


  7. 6 hours ago, pierremgi said:

     

    Hello. In your video, when reconnected, you are neither with former gear nor scuba gear.

    If you were in full scuba gear, you should have a rebreather (vest) and the action menu ready for former gear. With former gear, a uniform should be visible.

    Here, you have a weapon (diver) but neither uniform nor vest.


    I can reproduce that in my own dedicated server, with 2 players (Vanilla, but I guess it's not important)
    So it seems there is a lack of sync in this case. You can check for my (public) variable still OK in debug console (if allowed) : player getVariable "savedLoadout"  , after reconnexion of course.

    Did you place the code in initPlayerLocal.sqf ?
    And important did you let the sleep  command at the begin of the code? It seems to me important. Add more seconds for further check.

    No clue about what happens in your case. The incomplete loadout (you have a SDAR as weapon) is not easy to understand.
     


    Yes I placed it where you said and it was a copy/paste job so it is as you have written it.

    Regarding the SCUBA after a certain time period on land it gets thrown in the backpack and you have shorts on if I remember correctly.

     


  8. Thank you for the help Mr. Curry! I tested your code. After I load in and go to "Equip SCUBA Gear" I get an error message directing me to line 2 in equipscuba.sqf. The error states that there is a missing ;. I double checked line 2 and there is a semicolon there. Can you look it over and see if there is a mistake please? Also I am posting a Youtube Video that showcases the problem I was trying to describe in my original post. I am using Pierre's code for this test but it has the same problem as mine so it's a good example.

    Thank you for the help Pierre! Here is a video where I test your code, it has the same problem as the code in my original post.

     

     


  9. Wow! First off, thank you both very much for the help! These look like possible solutions. However most if not all of what you wrote in the scripts has gone over my head. Its just simply beyond my skill level. I do appreaciate the notes though. As I re-read them I'm trying to parse out what they do. Still, I always try to implement any given help. I will trying copy and pasting your code in a few different ways to see if I get some success and report back either way!


  10. This one is a little tricky to explain. Right now I have it all working minus this JIP issue. Let me explain.

     

    What I want:

    1. Players can equip scuba gear via addAction. (working as intended)

    2. If scuba gear is equipped they can restore their loadout via addAction. (working as intended)

    3. If a player leaves (game crashes) and returns I want them to be able to pick up where they left off. Meaning if they had scuba gear on when they left then when they return the addAction should be to let them equip their loadout (not working as intended)

    The problem:
    3. If a player leaves (game crashes) and returns while they had scuba gear on, when they return they are still wearing scuba which seems normal. However, the addAction available is "Equip SCUBA", which doesn't make sense because they already have scuba. I need the returning player to have "Equip Loadout".
     

    initPlayerLocal:

    scubaEquipped = false; // This makes sure the first addAction is "Equip SCUBA Gear"

    The addActions within a sqf:

    ptboat addAction ["<t color='#FFFF00'>Equip SCUBA Gear</t>", "scripts\scubagear.sqf", nil, 7, false, true, "", "_this in (crew _target) && !scubaEquipped"]; //Shows up if you are in the boat and have your regular loadout
    ptboat addAction ["<t color='#FFFF00'>Equip Loadout Gear</t>", "scripts\loadoutgear.sqf", nil, 7, false, true, "", "_this in (crew _target) && scubaEquipped"]; //Shows up if you are in the boat and have your SCUBA

    scubagear.sqf

    playerLoadout = getUnitLoadout player; //saves the loadout before equipping scuba gear so it can we recalled with equip loadout action
    //a bunch of items removed then scuba gear added to inventory.
    scubaEquipped = true; //removes the "Equip SCUBA gear" addaction and replaces it with "Equip Loadout Gear"

    loadoutgear.sqf

    player setUnitLoadout playerLoadout; //recalls the loadout that was saved in scubagear.sqf
    scubaEquipped = false; //removes "Equip SCUBA gear" addaction and replaces it with with "Equip SCUBA Gear"

    It's really hard to explain. I might make a video. But basically if I player leaves and rejoins his "progess" isn't saved. progress meaning which addaction state should be shown for him. Now that I think about it more. Maybe I need a way to save the client state if they crash and then call it when they return. I'm not sure if that's possible

    .


  11. 9 hours ago, pierremgi said:

    Not normal with an edited trigger!

    Delete and rework your trigger in editor.

     

    If no success, add a little timeout for the trigger

     

    if no success, add a variable and publicVariable it:

    in on act. field of the trigger: thisTrigIsActivated = TRUE; publicVariable "thisTrigIsActivated";
    check for  !isNil "thisTrigIsActivated"  in addAction


    I tried to publicVariable it and couldn't get it working. Perhaps I wrote it wrong which is probably the case since I don't understand it. But I did find a solution to this late last night!

    I ended up putting the addAction withing a sqf and using a Server Only trigger I remoteExec'd a ExecVM with the true for JIP. I tested it a bunch and no issues anymore!
     

    ["scripts\scubanow.sqf"] remoteExec ["execVM", 0, true];

     

    • Like 1

  12. Okay, I've done a bunch of testing on this and I've narrowed the problem down. Quick summary:

     

    1. Any client that was connected when the trigger was activated has access to the addAction. No problem there.

    2. However, the only way a JIP player can have access to the addAction is if they or any other client goes into the trigger area again. (By the way the trigger is non-repeatable and NOT Server Only.)

     

    So my solution would be to find a way for the the JIP client to know that this trigger was activated already. Perhaps there is a way to globally broadcast if a trigger was activated already?


  13. On 6/22/2024 at 6:22 PM, Schatten said:
    
    [
        [
            ["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/>"]
        ]
    ] remoteExec ["vn_ms_fnc_sfx_typeText"];

     

    Interestingly this works within a SQF but if I put it in the Activation field of a trigger I get the error message "Invalid number in expression". Any idea why that is?


  14. On 6/25/2024 at 2:51 AM, Joshua9797 said:

    Hi, I could imagine that you need to set the trigger to repeatable (a checkbox in the trigger).

     

    Alternatively, I would suggest moving the addAction to the script "initPlayerLocal.sqf" and adding the activation of the trigger as a condition for showing the action.

     

    initPlayerLocal.sqf: Executed locally when a player joins the mission (includes both mission start and JIP).

     

    The trigger activation can be added as a condition for the display as follows:

    
    ptboat addAction ["Equip SCUBA Gear", "scubagear.sqf", nil, 7, false, true, "", "_this in (crew _target) && !scubaEquipped && triggerActivated myTrigger"];

     

    If the players spawn in the trigger and you only use it for adding the addAction, you can also leave out the condition “triggerActivated myTrigger”.


    So I moved the addAction to initPlayerLocal.sqf but it still wont let JIP players access the addAction.


  15. On 11/5/2021 at 10:46 AM, stburr91 said:

    Cool, this issue was a major annoyance for me while making my SOG mission a few months ago.  There is a module that is supposed to allow you to stop ambient talking by classnames, but it wasn't working while I was making my mission. The devs said the module was fixed months ago, and would be included in their update, so I would assume the module is now working.   

    I'm not entirely sure this is fixed. I'm building my mission using the restrict voice module. It lets you input the object names turn turn off the ambient voices. I have been unsuccessful in getting it to work. I think I will try johnnyboy's solution and see if that works.


  16. 5 hours ago, mrcurry said:

     

    All publicVariable does is broadcast the current value of the provided variable. 

     

    So what's currently happening is:

    1. ShowGlobalAction starts as undefined (nil)

    2. publicVariable sends the nil value to/from the server.

    3. Line 2 assigns ShowGlobalAction to false which hides the action

    4. The network update to/from the server arrives and overrides ShowGlobalAction to nil again, revealing the action once more.

     

    So reverse the order and call publicVariable after the assignment is done.

     

    Edit: To be more efficient the trigger should be set to server only.

     

    Even with my limited knowledge, what you said in step 1-4 makes sense to me.

     

    However, I don't quite understand what you mean "reverse the order and call publicVariable after the assignment is done". Do you mean that I just have to swap the order of the lines in the trigger field to look like this?

    ShowGlobalAction = false;
    publicVariable "ShowGlobalAction";

     


  17. So I just tried this in the trigger field:
     

    publicVariable "ShowGlobalAction";
    ShowGlobalAction = false;

    It was interesting because the action went away but 1 second later it returned. Almost like it was being overidden by the "isNil 'showGlobalAction".

    I'm going back through lots of threads but no luck yet. I'm surprised that removing an addAction is so hard for JIP players. I can't count the times that someone had to leave the mission to answer the door, timed out, computer crashed, etc which turned them into a JIP player. I definitely want to take advantage of JIP functionality because of this.


  18. I just tested out this new one and it works great for JIP players I couldn't get it to break. This is one slight problem though. I have a trigger area that is supposed to remove the addAction. It works to remove it for all players when they enter the area except for someone who JIP. They have access to even after the trigger was fired. Right now the trigger activates like this:

    ShowGlobalAction = false;

    I'm confused as to why JIP players can still see this addAction after the trigger has fired for everyone else. My understanding is since this is a global variable it should be broadcast to all clients. So JIP players should see the addAction but they do.

    So to be clear I'm trying to remove this addAction for all players including JIP, without using the addAction itself to do so. Basically I give the players this addAction as an option at the beginning of the mission then use a trigger to take that option away if they advance far enough in the mission.


  19. I also would like to understand JIP functionality better. Unfortunately I don't have answers for you, but I would like to note one thing. I have read on some posts from years ago people talking about how the modules in the editor are not friendly for JIP on dedicated servers. I may or may not be experiencing this presently as well. In my mission if a player JIP then the tasks that have already been completed will rapidly cycle through the notifications at the top of the screen for every client connected to the server. I'd like to research this more but I can't find a definitive answer. I've read some posts saying that if you use the BIS functions for tasks inside your SQFs you will have more stability. I have no idea if this is true or not but it may be what I try next for my mission.


  20. What I want is players to have access to an addAction (provided they have activated the trigger).
    However right now if someone crashes and returns the addAction is longer there for them (even if they activated the trigger that spawns it)
    In the On Activation trigger field I have this:

    ptboat addAction ["Equip SCUBA Gear", "scubagear.sqf", nil, 7, false, true, "", "_this in (crew _target) && !scubaEquipped"]; //Shows up if you are in the boat and have your regular loadout
    
    ptboat addAction ["Equip Loadout Gear", "loadoutgear.sqf", nil, 7, false, true, "", "_this in (crew _target) && scubaEquipped"]; //Shows up if you are in the boat and have your SCUBA

    These lets the player easily swap between their loadout and SCUBA and it all works great minus the JIP issue.


  21. Just tested this on the dedicated server and it works perfectly! Thank you for this! This is literally 17 hours of me stumbling in the dark trying a million different things. And now I can move on to the next thing that will take twice as long and is twice as easy for experience scripters haha. A couple questions to help my understanding.

    First, do I really need "MPScriptGlobal =" anymore? Seems like the heavy lifting is being done by "publicVariable "showGlobalAction";".

    Second, do I really need to "remoteExec" this since "publicVariable" is global? Shouldn't that sync all the computers up?

    Haha, this dude comes out of nowhere, makes his third post ever and solves my problem like it was nothing. What an absolute legend! Thanks again!

×