Jump to content

thirith

Member
  • Content Count

    387
  • Joined

  • Last visited

  • Medals

Posts posted by thirith


  1. I expect this is a very newbie question, but does the server always know where all units are? I'm asking because I've read that units can be 'owned' by clients (e.g. a Headless Client) as well, and I don't know if this means that the server might not always know every single position.

     

    More concretely: if I create a trigger that spawns, say, a smoke grenade when heli1 is in the trigger area and begin the trigger with an if (isServer) condition, will this work and is it the right way to ensure that I don't spawn a smoke grenade for every single client plus the server?


  2. For the mission I'm currently working on, I'd like to create areas where you might bump into enemies without placing the enemy units by hand. Is there a module that allows for this, ideally with a number of parameters (e.g. enemy types, group size, likelihood of enemies spawning when players are in the area)? Alternatively, is there a script or similar that does this sort of thing well?


  3. Brilliant, thanks! I'll try that out next time I work on the mission. (Also, love the random answers. Arma missions need more Monkey Island.)

     

    The mission itself will be an asymmetrical versus mission: a squad is tasked with negotiating a truce with a couple of village leaders while a two-man sniper/spotter team is tasked with preventing this from happening. I don't know yet whether that'll actually work out, but I like the idea of asymmetrical versus missions as a nice change of pace from our usual coop fare.

    • Like 1

  4. I'm currently thinking of creating a mission where one team is tasked with gathering intel from the civilian population. The way this works in my mind is as follows: all the civilians in a Takistani village should have an action added (e.g. "Talk to civilian"); when it's used, a counter goes up by one and the action is removed from that particular civilian. Once the counter is higher than 3, a certain location is revealed.

     

    I think I know how to do this in a heavy-handed way, adding it to each civilian manually - but I expect there'd be a smarter, more elegant way to script this. Any suggestions how best to get this done?


  5. I expect there's a common solution to this, but I haven't found any yet: when I use the "Create diary" module to create briefing texts in the editor, they appear normally when I test the mission from the editor, but once the mission is PBOed and on the dedicated server, the briefing texts always are shown twice. Is there a solution to this or is the "Create diary" module too twitchy and it's better to do the briefing texts outside the editor?


  6. I expect this question has been answered elsewhere, but I've yet to find the relevant information. My question is about scripts that are executed only on the server and whether/how they cascade down to clients.

     

    If I have a waypoint that is only completed once a certain variable (say CheckThis) is set to True and the server executes a script CheckThis = True, what happens? Does the server tell the clients that the waypoint has been completed, even though CheckThis isn't True yet on those clients? Or does the server do its own thing? Would I need to make CheckThis public after it's been set to True so that all the clients are on the same page as the server?


  7. Thanks. I ended up not using your lockwp tip, since I couldn't get it to work (no idea where I went wrong); instead, I've now got OPFOR starting at a somewhat greater distance and prone. Still using your TALK waypoints, though, and a couple of variables that need to be set to true before the teams continue to the next WP; so far it seems to work okay.

     

    I'll only be able to test the mission this coming Saturday (we only play every two weeks or so). If anyone wants to try it out (players: 1-12), though, I'd be happy to share the PBO on OneDrive. Once I've tested it with others, I might put it on the Steam workshop.


  8. Those are some fantastic tips. I won’t put all of them into practice in my first defend mission, simply because I tend to overcomplicate my missions compared to my actual scripting skills, but I’m thinking of doing 3-4 such missions (thanks for the suggested locations!) and add some elements with each one.

     

    Right now I’ve definitely got too many enemies, though; one wave consists of 32 attackers to my 12 defenders (some groups don’t spawn based on the number of defending units), but there are four waves. That’s probably too many...

     

    I’m also wondering if the waves should be timed or based on how many attackers are still alive, e.g. once 25% of a wave has been killed, the next wave comes in. Any opinions?


  9. Some follow-up questions:

    • At present each wave consists of multiple groups. Can I use a multidimensional array - along the lines of gAttackGroupList = [[wave1group1, wave1group2, wave1group3], [wave2group1, wave2group2, wave2group3]] - with BIS_fnc_arrayShuffle? Or will that also shuffle the subgroups, so the invidiual waves might end up being mixed?
    • Also, I'm making some of the subgroups conditional based on the number of actual players; is this a problem for a script like the one suggested by johnnyboy?
    • Finally, is there anything I have to keep in mind with respect to MP, locality and the like? Do I have to check that the code is only run on the server?

     

    More specifically, I've adapted the script above as follows:

    // Put all attacking Group names in a list and randomize it with arrayShuffle function.
    
    gAttackGroupList = [
        [wave1group1,wave1group2,wave1group3,wave1group4],
        [wave2group1,wave2group2,wave2group3,wave2group4],
        [wave3group1,wave3group2,wave3group3,wave3group4],
        [wave4group1,wave4group2,wave4group3,wave4group4]
        ] call BIS_fnc_arrayShuffle;
    
    // loop through the attack groups with a delay before each, and unlock their waypoints to start them moving to attack.
    {
        sleep 60 + (random 60);  // delay 1 to 2 minutes before releasing next wave.
        _wave = _x;
        {
            _group = _x;
            _group lockwp false;
            _group hideObject false;
        } forEach _wave;
    } foreach gAttackGroupList;

    I'm thinking that if this is in init.sqf, it'll be executed on each player machine, which means that the randomised sequence will be different on each machine; however, I'd need one centralised randomisation but lockwp and hideObject would have to be executed on each PC.

    • Like 1
×