Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About pebcak

  • Rank
    Lance Corporal
  1. pebcak

    List Count * Clients

    I'm not really sure what best practices are so I'm kind of blundering around in the dark until I find something that works. What I'm trying to do is simply have a list of units, defined at the start, that when all killed trigger an event. I did simply use '{alive _x} count [serpent1,serpent2,serpent3] == 0;' as the condition but I was experiencing a strange half-second stutter. I had a number of these kinds of condition running - about 10 - and converting them all to the above over-complicated solution stopped the stutter, so I thought I was on to something. Ah well.
  2. I have a trigger (in the editor) with Name: T2 Activation: OPFOR OnAct: serpentList=+thislist ; serpentListCount=Count serpentList ; {_x AddEventHandler ["killed","serpentList=serpentList-[_This Select 0]; serpentListActive=(serpentListCount-(Count serpentList)>=1);"]} ForEach serpentList ; DeleteVehicle T2 (It counts all OPFOR within the trigger area at the start and places the info into a list then kills itself, and sets up an event handler to reduce the count as units get killed.) However, in MP the list value is multiplied by all clients. Â Pretty obvious what's happened now I've tested it. Â How do I stop this from happening? Â The idea being that there is another trigger waiting to be fired once all of the units in this list have been killed. Â Works SP, but in MP it clearly becomes impossible beyond one player. Â
  3. pebcak

    Say / PlaySound

    Kyle, Ah! I see. It was the term Player that was confusing me. I was assuming that it refered to a single player amongst all, not Player as being the player local to the client. Thanks for taking the time to explain that. Now, at least, I know what I should be searching for. *bow*
  4. pebcak

    Say / PlaySound

    Yes, but it's still not clear which of the two, if either, will play the sound so that all players can hear it no matter where they are in proximity to another player / trigger / whatever. I'm not sure that the xRadio commands will do what I want as they seem to have to originate from a specific player as well.
  5. pebcak

    Say / PlaySound

    Okay, but if I want a sound to be heard by all players, no matter where they are in the game world - a custom radio message for example - what should I use? Â 'playSound name'? Clearly, not interested in having the sound directional or be affected by doppler effect.
  6. As per BI wiki: unit say [sound, maxTitlesDistance, speed] and: playSound name Information contained within is a little confusing. What's the difference between the two? As a point of context, if I wanted a custom sound to be played so that all players (MP - obviously) can hear it clearly once triggered, which one, or what, should I use?
  7. Yeah, I read that. The query I have is if I put that call into the init.sqs file will the remainder of that init.sqs file only run after that call has completed?
  8. I have a short intro script that I would like all clients to run on joining. How do I call this script, called titles.sqs, from within the init.sqs file? As the intro takes about 30 seconds to complete, is there a way for this script to be called by init.sqs without the processing of the rest of the init.sqs script pausing until the titles.sqs script is complete? Does this make any sense..?
  9. pebcak

    Scripting Efficiencies

    As it happens I do have an AI list that will be attacked by other AI, so this check would need to be performed irrespective of player presence. (Two AI forces, first to reach 50% casualties withdraws.) I'll try it with the first method, see how that goes.
  10. pebcak

    Scripting Efficiencies

    UNN, Ah, now I understand what it's doing! Â Excellent stuff. Â (I'm assuming there won't be any MP issues with this method.) If I could award points on this board for helpfulness you'd get a bunch. Â Have a cookie instead... Many thanks. Â
  11. pebcak

    Scripting Efficiencies

    Okay, I tried to put this 'whitechapelList=+thislist; {_x AddEventHandler ["killed","whitechapelList=whitechapelList-[_This Select 0]; whitechapelListActive=(whitechapelListCount-(Count whitechapelList)>=10);"]} ForEach whitechapelList' in OnAct for the trigger that makes the list. I made another trigger that checks to see if whitechapelListActive is either true or false (tried both) as the condition for other messages, but it does nothing. I fiddled a bit with various elements but I either generated errors or nothing else.
  12. pebcak

    Scripting Efficiencies

    UNN, Cheers for that reply. I'm a bit new to all this, so I'm gonna ask some stupid questions most likey! I have several of these '{!alive _x}count whitechapelList >= 10;' -style conditions going on. If this is a laggy way of doing things then that may explain it, and it doesn't need to be tested anything like every 0.5 seconds either. Clearly I should have a script file if that is the most effecient way of doing things. Not sure how to do that tho. :S What I'm trying to do (and it does work as is, bar the every 0.5 second lag): The above 'whitechapel' example is to check to see if a specific group of soldiers is either killed or arrives at a location. I create an array with this in a trigger that just covers them at the start: whitechapelList = [];{whitechapelList = [_x] + whitechapelList} forEach thislist; whitechapelListCount=Count whitechapelList (which you say would be better off as per you example. I've not tried that yet.) And in another trigger, the one that kicks other things off if all within the whitechapelList are dead, I have the condition: {!alive _x}count whitechapelList >= 10;
  13. pebcak

    Scripting Efficiencies

    So far there are no external scripts, just editor triggers and the like, so I'm not sure how I can factor sleep into these. There are about 300 units and the majority do have waypoints to work through. As far as I can find there are no recursive calls happening; again, it's all in the editor so such a thing would be tricky to set up (even accidentally)? I could post the mission up for debugging if that would be helpful...
  14. Does removing the dead like this improve MP server performance significantly?