Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Everything posted by JB47394

  1. Does anyone know how to show a display on top of the Zeus map? I can put a display over the main display (46), the main map (12), and the Zeus display (312), but not the Zeus map. This is because the Zeus map is a background control (idc 50) and not a separate display. So putting a display up just hides the controls of the Zeus display, including the map. Close my display and those controls reappear. If I put up a dialog, controls such as the EDIT and CREATE panels (in "controls") will remain up, but if I try that with the Zeus map up (in "controlsBackground"), the map is again hidden. The only thing that seems left is creating controls right in the Zeus display, on top of any controls that are already there. That attempt will probably end badly and I probably won't pursue it. So I'm looking for a lifeline here.
  2. JB47394

    [SOLVED] Array trouble

    Absolutely sure.
  3. JB47394

    [SOLVED] Array trouble

    In your script, you have the line _allNodes = _allNodes apply... Apply will create a new array which is then assigned to the local variable _allNodes. After that, the caller's array is never touched again. Instead, You have to modify the existing array. So use a forEach on _allNodes and fiddle with the array contents.
  4. Because I have no interest in spending the time to find out. I have a long list of development tasks and the return doesn't justify the potential cost. The UI has input elements.
  5. Thanks, Quicksilver. It's good to learn how you guys created the circles. Unfortunately, we have circles of arbitrary radius, so we'll have to stick to our object-intensive approach. For those curious, Quicksilver creates a single, vanilla, simple object. They are colored by faction and come in 100, 200 and 500 meter sizes. Here's a 100m one for East (colored red). createSimpleObject ["a3\Modules_F_Curator\Multiplayer\surfaceSectorEast100m.p3d", _positionASL] There are surfaceSectorEast, surfaceSectorWest, surfaceSectorCiv, etc. p3ds in modules_f_curator.pbo
  6. I eventually figured out what I was after. Here are two functions that create and delete a circle on the ground. Because it's just a bunch of objects in a circle, it's much like @Harzach's solution, except that I can simplify things because I'm using decals, not objects. As a result of the particular object I'm using, the line segments are always white and always 4 meters long, so large circles can generate hundreds of simple objects. That said, I haven't seen a significant performance hit on my 1070ti with as many as 400 segments. I did, however, include a way to draw a segmented circle (the _spacing parameter on TEST_CreateCircle). If anyone knows of a p3d for other line segments in vanilla ARMA, I'd appreciate hearing about them. TEST_CreateCircle = { params ["_center", "_radius", ["_spacing", 1, [0]]]; private _segment = createSimpleObject ["a3\roads_f\Decals\Decal_white_line_F.p3d", _center]; private _bounds = boundingBoxReal _segment; private _lineLength = (_bounds select 1 select 1) - (_bounds select 0 select 1); deleteVehicle _segment; private _circumference = 2 * _radius * pi; private _segmentCount = ceil (_circumference / _lineLength); private _stepAngle = 360 / _segmentCount; private _segments = []; private _angle = 0; for "_i" from 1 to _segmentCount step _spacing do { _angle = _i * _stepAngle; _segment = createSimpleObject ["a3\roads_f\Decals\Decal_white_line_F.p3d", AGLtoASL (_center vectorAdd [sin _angle * _radius, cos _angle * _radius, 0])]; _segment setDir (_angle + 90); _segments pushBack _segment; }; _segments }; TEST_DeleteCircle = { params ["_lines"]; { deleteVehicle _x } forEach _lines; }; //mycircle = [getpos player, 400, 5] call TEST_CreateCircle; //[mycircle] call TEST_DeleteCircle One thing that I found interesting was that if I created the simple objects with AGL coordinates (simple objects are supposed to get ASL coordinates) then they'll show up, but line segments close to the camera won't be drawn. At least, that was the behavior I got while drawing circles at Altis's main airport. I mention it in case anyone else has seen strange behavior in their simple object decals (e.g. roads and such).
  7. Is there a way to force ownership of a turret onto a particular machine? I know that turretOwner is available, but I don't see a setOwnerTurret or setTurretOwner, and setOwner doesn't seem to include the turrets. My scenario: Zeus spawns an empty vehicle. At the appropriate time, a server script takes the vehicle and puts crew into it and sends it on its way. To do this, the script ensures that the vehicle is first local to the server, then spawns the crew up and issues the appropriate assignAs and moveIn commands. The driver goes in just fine. Unfortunately, the turrets on the vehicle are still local to the Zeus client and the moveIn commands for the gunner and commander fail. As a result, those two have to go through the process of moving to the entry locations on the vehicle and then mounting up. Sometimes the driver starts off without them. None of that is desirable. Note that after the AI have mounted up, the turrets are indeed local to the server. Repeating the process with that vehicle works just fine, as it does if the vehicle is spawned on the server.
  8. This is what I ended up with to bring the turrets local. _vehicle setOwner clientOwner; waitUntil { local _vehicle }; // Completes in 0.1s waitUntil { allTurrets _vehicle findIf { (_vehicle turretOwner _x) != clientOwner } == -1 }; // Completes in 2-4s The turrets will go local if they're just left to do so. There's no need to add anyone to the driver's seat, nor does that appear to accelerate things.
  9. Yes, I tried that very early on. Unfortunately, safe crews turn out and safe soldiers walk. The techniques I've used above keep the crews buttoned up and the infantry moving at whatever pace I choose.
  10. I'm disabling the normal action menu while I'm performing a user interaction (via uiInGameSetEventHandler). I'm using the same keys and buttons as the action menu for this interaction ("action", "closeContext", "prevAction", "nextAction"). Every step of the interaction is flawless now except for one niggling little problem: if the user clicks the middle mouse button to complete the interaction, the interaction completes, but the action menu pops up. This is not true of keyboard keys; if the interaction is completed by pressing space, then the action menu does not appear. To be clear, both space and middle mouse button are defined as "action" keys. I'm intercepting KeyDown and MouseButtonDown events, then using inputAction to spot the various actions that I want to override. I've verified that I'm overriding the mouse click and the space. Has anyone else seen this sort of asymmetry between mouse and keyboard events? I'm not happy to have the quality of the user interaction damaged by this, but I can live with it.
  11. JB47394

    Can this AI behaviour be fixed?

    Try getting them to do anything specific and you'll be tearing your hair out. Try getting them to do anything reliably and you'll be screaming at the screen. For the most part, if you want the AI to do what the AI does, you're in great shape. If you want anything else, you're in for a lot of pain and suffering. Sadly, the existence of many scripting commands for directing the AI suggests the possibility of trying to get them to do other things. There lies madness. I've seen them run over their own guys. It's as if somebody swapped a sign in the code and they turn towards instead of away.
  12. Unfortunately, all my tests suggest that this doesn't accomplish what I'm after. In truth, it doesn't seem to accomplish anything. My test involved creating a Marid and sending it down a road past various enemies. For example, a couple enemy Hunter HMGs. If I start the Marid with behavior "aware", then it will drive past the Hunters, the Hunters will shoot at the Marid, and it will turn aside from its waypoint to engage the Hunters. If I start the Marid with behavior "combat", then it will spot the Hunters, stop and engage. Tested both in the editor and on a dedicated server. What I'm after is to have a Marid transport drive from point A to point B, drop of troops and leave. If it happens to see enemies, it shoots at them, but not at the cost of its primary mission. So I need movement to be the priority, not shooting. I've tried dozens of variations on directing a three-man crew such that they prioritize movement and I've been unable to get a Marid to do it. I've tried changing the organization of the groups for the crew members (to the point of putting the driver into a group led by an AI that's nowhere near the fight), disabling various aspects of AI, fiddling with the various modes available, etc. At all times, if the gunner is capable of engaging an enemy, the vehicle will ignore the waypoint. The solution I've been working with for the last year or so is a time-based monitor. The Marid is expected to keep a schedule. So long as it doesn't fall behind, it can shoot. If it does fall behind,, it is forced into a movement-only mode and that usually gets the vehicle back on track. If it gets back on schedule, it is left free to shoot again. It's hardly ideal, because it requires a spawned monitor and other complexity, but at least the Marids both shoot and move, if not at the same time. The Advance/Engage system for infantry seems to be working well but, as with my Marid solution, it's a "move or shoot" setup. At least it's event based. If anyone has a working system that allows simultaneous move and shoot that works with a Marid, I'd love to hear about it.
  13. Thanks. I went and restructured some code that must have the calls in their original order, but it's not a technique I'd like to sprinkle through my mission system. I'm pondering some general purpose machinery for collecting JIP calls, setting them aside, reordering them all when JIP replay has completed, then calling them in order. I know that I can see when JIP replay is underway, but I'm not sure of the technique for detecting completion of the replay. Can JIP replay be mixed with live remoteExec calls? If not, then I can try to have the server fire a remoteExec at a connecting client so that it can use that as a signal to replay the ordered JIP calls. Is there a standard practice for ordering JIP replays?
  14. I'm issuing several persistent remoteExec calls (i.e. JIP true) in the order A, B, C, D, E. When a client connects, the client sees them arriving in the order E, D, C, B, A. I'm sure of the order because I'm logging my calls to the report file on both dedicated server and client. Is this a known behavior?
  15. I've looked high and low for the stringtable for the standard ARMA strings and can't find a thing. According to the documentation, it's found at \res\bin\stringtable.csv, which isn't a lot of help. I have no stringtable.csv on my computer, and all the stringtable.xml files are either for a mod or for my mission. I want to be able to use a localized string from the stringtable, but have no way of knowing which key it has been stored under.
  16. I think you missed the meaning of my post and I invite you to read it again.
  17. Who is "they" in this context?
  18. Thanks. That pointer is much appreciated. I suspect that I can use it to solve a host of problems with my armed transports. Do you have an experience with that command as it applies to infantry?
  19. I have another idea. It involves Bohemia documenting their product so that their paying customers don't have to do their job for them, expending countless man years of testing and researching trying to comprehend a badly-designed black box of haphazard functionality - instead of spending that time building up functionality on top of the base product, enhancing its appeal for everyone in the community. But that's just me.
  20. The purpose of documentation is to allow readers to understand concepts not to avoid omitting information. How about explaining the process that localize goes through? In what order are files checked/loaded? Mission, mod, system? Are all PBOs that are loaded by ARMA candidates for providing a stringtable.xml? Can I override a system stringtable by using the same key in my mission or mod stringtable.xml? Can I add to the language choices for a different PBO's keys? There is a conceptual framework for how localize works with stringtables and that's what the wiki should be articulating.
  21. The wiki states that, as of 2 July 2017, this is an unsolved problem. https://community.bistudio.com/wiki/Arma_3_Damage_Description#Standard_Hit_Damage
  22. Let's say that a vehicle has the following HandleDamage handler: _object addeventhandler ["HandleDamage", { params ["_object", "_selection", "_damage", "_source", "_projectile", "_partIndex", "_instigator", "_part"]; if (_part != "") then { _damage = 0 }; _damage; }]; When such a vehicle is damaged (I use explosive charges through Zeus), getAllHitPointsDamage will always return zeros for all parts of the vehicle. In contrast, damage will rise until the vehicle is destroyed. So the vehicle is destroyed despite saying that no part of the vehicle should be damaged - and no part of the vehicle IS damaged, according to getAllHitPointsDamage. Note that the handler above is only illustrating the problem with damage filtering. I'm not trying to come up with a way to prevent all damage to a vehicle. To solve this requires figuring out what the correct global damage value should be so it can be passed back from the event handler whenever it sees the global selection (""/-1). I tried a few different ways of calculating the global damage from getAllHitPointsDamage, but I can't match the damage value that ARMA reports. It's not the average of all part damages (the technique used by A3). It's also not the sum of part damages multiplied by their CfgVehicles >> vehicle >> HitPoints >> passthrough values. Does anyone know how to compute that global damage value accurately? Can it be done with scripts?
  23. https://community.bistudio.com/wiki/localize Which says that the keys look up translations in stringtable.csv or stringtable.xml - which is an incomplete statement. It will also return strings from the stringtable.xml files in various language_f pbos and, I assume, from mods. An explanation of the location of the language_f pbos would also be helpful so that people don't have to go wandering the hills looking for them. I only survive by using Everything. There's also https://community.bistudio.com/wiki/Stringtable.csv Which is where I found the mention of a 'global string table' called \res\bin\stringtable.csv,.
  24. Awesome. Thanks to your post, was able to fish around and eventually find the keys I was looking for. The wiki could certainly use an update.
  25. Here it is nearly a year later and I was revisiting this problem when @bad benson 's comments finally sunk in. The solution is, indeed, to go with a display instead of a dialog. I was tripping over the fact that I use cutRsc and createDialog throughout my current codebase, and always equated cutRsc with displays. But they're not the same. A cutRsc doesn't catch keyboard and mouse events at all. So conceptually I just needed to switch from dialog to display. At the code level, I had to change createDialog to createDisplay, and I also had to make sure that my control references were explicit to a specific display instead of implicit to the current dialog. In other words, I had to convert things like "lbCurSel 1400" to "lbCurSel ((findDisplay 800) displayCtrl 1400)", where 800 is the IDD of my display. Beyond that, there may be some gotchas that I haven't picked up on yet. The keyboard events pass through the display if they're not explicitly intercepted, and that may mean that the player may be able to do certain things that aren't compatible with my display. Belated thanks, @bad benson.