Jump to content

The Real Bunc

  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

80 Excellent


About The Real Bunc

  • Rank

Recent Profile Visitors

134 profile views
  1. The Real Bunc

    Server and Headless Client setup

    Agh, so I could theoretically setup a HC as essentially another machine running on one of my other cores? Any guides around on that? The material ive been looking at seems to assume HC is running on another machine.
  2. I've been dipping my toe into the subject of MP setup and coding as Ive largely restricted myself to SP stuff to date. I run my Arma on a decent Laptop and it works ok for my purposes for SP but MP as sole server , hmmm. So I was interested in the notion of headless clients and I've been reading Monsoons very helpful guide. Im thinking of something like the following setup > my laptop as server and me as player, a HC on my own home LAN ( or direct connected to my laptop) and then being able to host games for a small number of players. My questions than arise on a mix of tech and related code issues. Any observations would be helpful. 1) The armaserver exe has to run on both the server ( my laptop) and the HC - Yes? 2) in terms of locality I assume that clients ( players) own any members of their own squad who may exist? - ie these particular Ai wouldn't be handled by the server or HC scripts. 3) I see that HC are helpful in taking the AI load and that there can be more than one HC. If there is more than one - then can the AI be loaded part to one and part to another sort of thing? ie you could have one HC managing Blufor Ai and another managing OPFOR Ai? I noticed in the HC guide that the HC armaserver exe can be run on Linux. Which made me think - is there anything in principle which would stop me using two or more cheap as chips Raspberry PI's as headless clients, or two cheap laptops? Sorry for these probably really N00b questions re MP, server, Hc etc
  3. GOM, I spotted the shadow function on that one when it was mentioned before but somehow completely missed the irradiation function. Plus one for that then if its giving an actual irradiation value at unit position.
  4. I was hunting for something to directly find ambient brightness for my DynamicCamo script but couldn't find anything so I used the sunrise and sunset times to calculate a day/night factor which works quite well to represent what the sun is doing. BUT ambient light is also impacted of course by overcast, rain, fog etc. The way I put these together in DynamicCamo is essentially a proxy for overall light level.
  5. Do you mean change the label for the player so that you can refer to that name rather than "player" in script? You can do that by an assignment eg chosenname = player I would think. You then use chosenname rather than player in script.
  6. The Real Bunc

    Vehicles command - Aaaaaaaagh!

    Very helpful Pierre. I of course had some faint hope that there might be an actual command I wasn't aware of and it wasn't an almighty mess. I got round my immediate problem by simply making a list of vehicles at mission start but of course that's a crap solution and I don't have crates placed which from what you say would also mess things up. So a filter it is. I'll try your code, many thanks. One thing on a quick look at your code - im not sure on a first look what work the isNill is doing in that vehicles select expression?
  7. I'm doing some work on a script which shows vehicle icons on the map, it works but I get a problem once vehicles start getting destroyed. The problem is that the array returned by the vehicles command changes its form depending on whether destroyed vehicles are present. So for example if I have a number of vehicles placed , crewed or uncrewed at the start then I can use vehicleslist = vehicles and I get this form of array returned - [O Alpha 1-3:1,O Alpha 1-4:1,O Alpha 1-5:1,O Alpha 1-6:1,B Alpha 1-6:6,B Alpha 2-1:1] However when a vehicle gets destroyed the array produced by the same command changes [O Alpha 1-3:1,O Alpha 1-4:1,O Alpha 1-5:1,O Alpha 1-6:1,B Alpha 1-6:6,B Alpha 2-1:1,249d56118c0# 1780326: dummyweapon.p3d] Notice that initially I have a nice array with each vehicle as a distinct entry. This means that the array can be looped through and appropriate action taken for each entry - nothing superfluous and the array is predictable. Now look at the end of the second one with the destroyed vehicle in it, the last entry B-Alpha 2-1:1 Now, instead of one entry we have two , the first one as before identifying the vehicle but then followed by some numbers and a p3d reference. But note that these are included as an additional array item. My original array contained 11 clearly distinct array items each representing a vehicle, now I have an extra item because the engine decided to chuck in stuff about the damaged vehicle model or something. The problem gets worse, not only does this destroyed vehicle now have two distinct entries in the array but from what I've seen some destroyed vehicles may generate an extra two ( or more?) entries of a similar type.. all comma separated of course so as to f up your array handling. So we are left dealing with an array which varies up and down not only in size but in format depending on the status of the actual things we are trying to get a list of in the first place!. Who the f thought that was a good idea? Anyway, my problem is - how would I handle the array when its changing unpredictably like this when I simply want to cycle through all vehicles applying code to each one? Im sure there will be some kind of alive test I can do but the problem is I wont know how many array entries always to skip etc . Driving me nuts. Surely a more sensible approach would have been a command that simply returned all vehicles regardless of condition then allow for checks and this other info to be returned by a distinct separate command. Anyway that's the beef but Im really interested in how to cope with unpredictable arrays like this.
  8. The Real Bunc

    [RELEASE] DynamicCamo Script

    Re it stopping on players death - yes I would expect that because the script as it now stands runs as an instance for each unit its run on. When that unit dies its own script instance of the script should die with it. If you have a scenario with respawns then any unit that has this script on it will need this script set on it again if you are planning to respawn it , including player. I haven't really tested the script in anything other than SP so if you are testing it in MP then you are breaking ground with it. Im mulling over a few changes to the script anyway so any further feedback you can give me would be most welcome. Just another thought - I wasn't envisaging this script being run via a call because that's unscheduled and this script isn't time critical and can wait its turn if need be so I think its better called via spawn or ExecVM anyway.
  9. The Real Bunc

    [RELEASE] DynamicCamo Script

    Agh I see what the issue is. Ive included in my debug a hint for the knows about value for one particular OPFOR ai (Leader of he group that passes down the road as test scenario starts) . But that's an example scenario specific thing and if you use the script elsewhere you wont of course want that. My bad. Ill fix it later today so that the script doesn't have that scenario dependency element in it. (Or meantime you can put a soldier named man in your scenario while you are debugging and use it to monitor his knows about value)
  10. Larrow, got to say thank you. Ive just finally clocked what scripted event handlers do. I realise that respawn in missionnamespace is one of the listed events for scripted event handlers. Am I right in thinking that if I set my own variable then in a namespace I can set the Boolean value of that variable and so trigger any scripted event handler ive set to use that event? I think that was wrong. Reading the Biki again I think I use callscriptedeventhandler to trigger my own scripted event handlers. Agh ha!
  11. That's bang on target Larrow and works great and bypasses the problem of getting code to register through the input box. It's interesting seeing you use a scripted event handler given the active discussion of those on another thread as well. Could you say a little about how this scripted event handler is linking to the spawnvehicle event? Is that the reference to Missionnamespace "Respawn" ?
  12. This was a result of trying something out for another thread and its got me stumped. I have a helicopter on ground with crew. I have the helicopter linked to a Spawn vehicle module. In the "expression" box of the SpawnModule I can put code in to fill the helicopter with crew and give the helicopter a waypoint and it all works fine. But the expression box is small and I wanted to deliver a larger bit of code to the expression. So I put the identical code that I had used in the spawn box into an sqf. I need to then pass this code as code to the expression field. The expression box says it takes a variable or code as input. So I try codeforexpression = loadfile "mycode.sqf"; // no deal. it puts "" around my code so when I put codeforexpression into the expression field it doesn't work. ( no debug hint to indicate code was run) codeforexpression = compile loadfile etc // again nothing doing. No indication it was run as code and this time a check via debug shows my code with {} wrapped around it. but the expression code works fine when it is simply entered into the expression box. I just need to deliver a block of code to that expression field in the spawnVehicle module but without it being wrapped as a string with "" or as a code block with {}. Am I missing something obvious?
  13. Id forgotten about that command. Done and dusted then.
  14. Oh, I see. I think you'll need to do this by calling a script that creates the crew and assigns then to the vehicle. There is a field called "expression" when you open up the module which runs given code when the module activates. Id try calling a script file from there and in the script file spawn the crew and assign them to the vehicle.
  15. Respawn it on the ground and observe what happens?