Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Everything posted by dwringer

  1. Hey everyone, I didn't want to post this here but in the WIP forum; however, I wanted to get an alpha release out to see if anybody might report any problems (and I'm sure there are guaranteed to be plenty). This is my first effort at creating a terrain beyond a 4 square km section just to follow along with some tutorials. I'm just getting it out since I haven't got a lot of time to work on it right now but have already invested a fair bit. This one is 12,288mx12288m, but there's definitely not much by way of fine detail. Or any detail. There is an enormous and extensive list of things that remain to be done on this before it can even move past really a pre-alpha phase. The airport has some major problems, barely usable by humans and not recognized by the game or the AI. TOH buildings don't show up on the map, and I don't know if you can normally climb ladders on the water towers but you certainly can't here. Most of the ladders on A2 buildings should be working, though. However as scenery to fly a helicopter around, this is more than sufficient, and the major road infrastructure is in place to allow some AI to move about on the ground. I have implemented most of the major landmarks around the downtown areas, and have begun placing houses in some of the rural areas. I am gradually planning to remedy the building situation. As it stands currently there's a lot of painted-on scenery. The general treelines are all done, though; however, there's no rock/bush/misc layer. The trees are mixed somewhat haphazardly via world tools in a single layer but that corresponds pretty well to the actual location. Here's a link: http://www.dwringer.net/a2m/smon.rar I'd be happy to know if anybody has success getting this to work. It requires Take on Helicopters patched with Rearmed and Arma 2. It may work with A2Free, I really don't know. I didn't use any OA assets to my knowledge. Thanks everyone, and especially thanks to Shezan74 for World tools, and Sgt Ace for the sample map materials. Forgive me that the map is actually called DW_SampleMap.pbo at the moment :j: Updated 11/18/2012: Many houses added. Updated 11/19/2012: More houses, some more roads (in theory). Updated 11/20/2012: A lot more houses, more roads. A lot of the minor roads haven't been smoothed but many should be functional. Updated 11/21/2012: Many more houses, some minor fixes (and probably regressions too) Updated 11/22/2012: Cleaned trees off some roads, filled in some more of downtown. Updated 11/23/2012: A bunch more houses. A few more houses fixed. Updated 11/24/2012: Realigned most(?) problem houses, a couple more roads, repaired layer texture issue that was probably preventing anyone from using this since revision 1 or 2.
  2. I have not yet tried this out, but I want to say the concept is really great! I know there was a website along the same lines as this at one point, possibly still around, which I tried once, but it's great to see this kind of development proceeding. I have come close to trying something like this two or three times now, and with Arma 3 it would be great to see the concept taken to the next level. I can't really commit any time to the idea right now but I've always thought a dynamic campaign outside of the missions - a la Total War Series' strategic Campaign map vs. tactical Battle maps, could be implemented with technology just like this. The possibilities are truly endless and I've always thought it was a shame a team hasn't approached the issue. Then again, here I am talking about it, and not approaching the issue ;)
  3. without worrying about the intricacies of array manipulation, which i'll assume you probably did right or will get right, at a glance.. it looks like you have one too many close brackets (]) at the end of your '_myarray = ...' statement? hehe
  4. dwringer

    Random spawn with marker

    _cap = _this select 0; _ranPos = floor random 2; _capPos = getMarkerPos format ["cap_pos%1", _ranPos]; hint format ["%1", _ranPos]; _capPos set [2, 0]; _cap setPosATL _capPos; _cap setCaptive true; Try that one, some space saving techniques (that's assuming it works, of course; untested ;))
  5. Hello all, I've had this script sitting around with some bugs in it for a while, so I used the A3 alpha release as an opportunity to go over it and try to bring things up to a higher standard. This script, when called, will set the date and time to random values chosen from within the ranges provided in the mission editor. The time of day, however, is not entirely random. I have implemented a function by rübe that calculates, for a given latitude and longitude read from the map config, the time-of-day corresponding to both sunrise and sunset (Within a reasonable margin of error). In a majority of cases when a randomly chosen time falls into what might be considered "night", the time will instead be set to either the calculated sunrise or sunset time. As a final result, there is a relatively small chance of missions occurring in the dead of night, with a higher-than-average chance of getting relatively dramatic lighting effects. This script really showcases the engine's dynamic lighting and palette effects. Anyway, without further ado: This code is also dependent on the following, which must be saved as "rube_fn_sun.sqf": Please let me know if anyone finds any issues with the above. There are probably glaring flaws to which I remain oblivious, but I imagine everyone could benefit if they were fixed ;) EDIT: Instructions: Put the script into an sqf file, such as "randomTime.sqf", and then A) create another file called "init.sqf" containing the line: execVM "randomTime.sqf"; or B) using a trigger from the mission editor, in the "On Act: " field put something like: _rt = execVM "randomTime.sqf"; Hope that clears anything up :)
  6. either call it with: _nul = this execVM "NakedTime.sqf"; and replace your "player" lines with "_this", or leave your call as-is, and replace your player lines with "(_this select 0)" <though, in that case, it might help at the top to say something like _u = _this select 0; and then just replace instances of "player" with "_u". [Also, note that i changed "nul" to "_nul", as you want the variable to be discarded and without the _ it becomes a global variable and is kept, but the _ makes it private, and it is immediately discarded since it has no scope in which to exist.]
  7. Ah, no you're not moving the trigger. After the _light = createvehicle line, in the trigger's activation field, add another line of the form: _light attachTo [syntax...] That should help. _light is a variable that exists only in the scope of the trigger activation, so you can't access it from anywhere else without making it global somehow or passing a reference some other way.
  8. dwringer

    Arma 3 Coding

    If that's how you perceive Linux users, and Arma players, then I'm sorry. We like Arma because it has a much greater POTENTIAL than anything else. Linux is the same way. I love windows, and use it all day long. But the open source community collectively lifts the computer world to enlightenment and serves as a humanistic beacon in a capitalist society on overdrive. Arma is like that to COD. Kids get a choice to grow up either to be computer scientists, or as neurotic antisocial (in the clinical sense of the word) ticking time bombs. I mean, you can call the editor needlessly complicated if you like, but the fact is it was not designed for you. CoD probably was.
  9. dwringer

    execVM in a button?

    Not sure, but try changing the line to: onbuttonClick = ["true execVM ""Atmo.sqf"";"]; Note the double quotes - this tells the parser not to break out of the outer quotation marks. Otherwise it looks like: "true execVM " Atmo.sqf ";"
  10. dwringer

    trigger help activation

    Give the helicopter a "HOLD" waypoint where you want him to wait, and subsequently give him the waypoint to come where you want him to go. Now, set the Trigger "Type" to "SWITCH", and synchronize it to the helicopter's hold waypoint. Voila!
  11. Yep, if you want to know exactly what is "night" and "day" unfortunately the engine doesn't really define anything so concrete. I made a script utilizing another bit of code by rube which takes sunrise/sunsets into account, and randomizes the time making some decisions about that. You could technically co-opt the same code and tell it that it MUST pick a time between sunset and sunrise for night, or between sunrise and sunset for day. See: http://forums.bistudio.com/showthread.php?148411-A-method-of-getting-weighted-date-time-randomization
  12. dwringer

    setOvercast ??

    Sorry I didn't provide the link myself, was hoping to force more people into getting into the habit of using the Search on the tracker, since "setOvercast" is actually very easy to find ;) But clearly I didn't understand what you meant the first time. Good find on that. If I could I would further clarify the nature of the issue on the ticket, but your note seems quite sufficient to bring it to the developers' attention. :) I wonder if this is related to the added dimensionality of weather changes associated with the setForce command, which sets how quickly the wind speed can change. Also something I did notice, changing the in-game time has an effect on where the clouds are in the sky, even when leaving all the weather parameters untouched. Doesn't do anything to the overcast value, however. :\
  13. Really the best suggestion I have is to try your above code and change "doGetOut" to a use of the "allowGetIn" command. I believe something like : (units group squadLeader) allowGetIn false; that forces them to disembark. doGetOut has never worked for me either, IDK. I remember having a lot of issues with this stuff at one point too, it comes more naturally with time is all.
  14. curtcool is right, you must use "unassignvehicle" on the squad members to allow them to disembark. They disembark with a "GET OUT" waypoint synced with the helicopter having a "TRANSPORT UNLOAD" waypoint. You should leave thep ilot in the helicopter until you get the rest of it working. Then you can move him out separately. You MUST synchronize the squad's GET OUT with the helo's TRANSPORT UNLOAD, and you must unassign the cargo members. Also, the "land" command you posted in the very first post should get the chopper to land where you want. You might need to set the helicopter to "Never engage" or "Hold fire" or disable his targeting AI by some means. EDIT: finally, the helicopter's pilot must be "assigned" as the helicopter driver for the waypoint synchronizations to have the proper effect. This is done with "assignAsDriver" command I believe. EDIT 2: lastly, the "allowGetIn" command will tell an array of units that they must disembark from whatever vehicle they are in, which could be used with a trigger to accomplish your last idea.
  15. dwringer

    setOvercast ??

    I made a ticket, but I'm not sure what the update is. AFAIK setOvercast is still not working as it is supposed to. Also I'm not sure what you mean by your post. I did not notice any changes, including light in the skydome, when using the setOvercast command. Using the Overcast sliders in the editor works as expected. In Arma 2, a script like: 0 setOvercast 0; 60 setOvercast 1; would basically start you with a clear sky, and then transition to full coverage within 1 minute. The settings in the editor basically did the exact same thing as this, and do not appear to function differently now - the only difference is that setOvecast itself does nothing. Go add a comment to the tracker yourself though, if you have more info :)
  16. dwringer

    Arma 3 Coding

    Who knows why people do what they do. The fact remains that the series has shown a constant improvement in usability just as you describe. Not only that, but the modding community has created DOZENS of FANTASTIC tools for editing game content. You also have to realize at some point that this is a civilian product derived from a professional military product. They will not spoon feed everything to you; it would be arguably in bad taste to do so. And the community seems as user-friendly as the game, you get back what you put in. The more you learn about it, the simpler it will all seem, and you will see that any layer of superficial simplicity would strip vast amounts of potential.
  17. dwringer

    Arma 3 Coding

    LOL, well it took me years to fully grasp but in fact, you can really do anything from inside the editor if you want to. It's just a matter of learning the syntax and how all the different things like triggers, waypoints, game logics, namespaces, etc work in the engine. It just happens to be every bit as complicated as learning any other mature, commercialized programming environment. Which it is :P
  18. You can place a Game Logic object on the building in the editor, and in its on act do something like "bldgToBurn = nearestBuilding this". Now the building should be named 'bldgToBurn' and will respond to scripting.
  19. dwringer

    setOvercast ??

    Been experimenting with the same thing myself, and I don't really have much to report other than that it does indeed seem to be nonfunctional. I have tested: setOvercast : not working setRainbow : sets variable but cannot demonstrate effect? setLightnings : sets variable but cannot demonstrate effect? setWindForce : unknown, does appear to be working setWaves : appears to be working setWindStr : works, but must set wind to Manual in editor setGusts : works, but must set wind to Manual in editor setRain : working setFog : working setWindDir : working it is odd because in the BIS functions, there is an a3>ModuleEvents>BIS_fnc_weatherModule script which appears to utilize these very functions; I presume it is a component of the weather module or intended to be used with the weather module. Regardless, I cannot get the module or the function to change the non-working parameters at all.
  20. Hello, I have been working on this script for over a year and only recently made the breakthrough allowing it to work effectively on entire groups rather than single units, so I decided to release it here. Hopefully there are not too many bugs. /* Arma 3 Dismissed Unit Bounding Script Stops "DISMISSED" units from moving beyond a certain radius. Reinitializes the unit/group. Break by adding "hasRebelled" flag to leader's namespace. Not tested for MP. Updated: 9 March 2013 Author: dwringer Arguments: [leader, radius] */ private ["_man", "_distMax", "_distRet", "_posStart", "_tx", "_ty", "_td", "_distCurr", "_grpOld", "_grpNew", "_wptReturn", "_wptDismiss"]; _man = _this select 0; _distMax = _this select 1; _distRet = _distMax * 0.85; _posStart = getPos _man; _man setVariable ["hasRebelled", false]; sleep random 5; while {!(_man getVariable "hasRebelled")} do { _grpOld = group _man; _distCurr = 0; {_tx = (position _x select 0) - (_posStart select 0); _ty = (position _x select 1) - (_posStart select 1); _td = sqrt ((_tx * _tx) + (_ty * _ty)); _distCurr = _distCurr max _td;} forEach units _grpOld; if (_distCurr >= _distMax) then { _grpNew = createGroup (side _man); _wptReturn = _grpNew addWaypoint [_posStart, 0]; _wptReturn setWaypointType "MOVE"; _wptReturn setWaypointSpeed "LIMITED"; _wptReturn setWaypointCompletionRadius _distRet; _wptDismiss = _grpNew addWaypoint [waypointPosition _wptReturn, 0]; _wptDismiss setWaypointType "DISMISS"; _wptDismiss setWaypointSpeed "NORMAL"; _wptDismiss setWaypointCompletionRadius _distRet; _grpNew setCurrentWaypoint _wptReturn; {[_x] join _grpNew} forEach units (group _man); deleteGroup _grpOld; }; sleep 45; }; Usage is simple: Save the script to an .sqf file such as "wrangle.sqf". Call with _nil = [groupLeader, radius] execVM "wrangle.sqf" For example: Place a group of civilians in the editor. Give them an initial waypoint of "DISMISSED", right where they are. In the leader's Initialization: field, put: _l = [this, 100] execVM "wrangle.sqf" Now preview the mission. The group of civilians will wander about aimlessly until one of them gets 100m from the group's starting location. At this point, you should see the group coalesce and reconverge at their initial starting position. Hopefully this works okay for people. The AI in "DISMISSED" mode is very dodgy, but this mitigates the worst effect (the endless roaming) in exchange for groups that frequently like to reconvene.
  21. dwringer

    Patrol scripting

    try: opfor_patrolFnc = { _n = _this select 0; _marker = _this select 1; _side = _this select 2; _mingroupSize = _this select 3; _chance = _this select 4; _dist = _this select 5; _units = ["O_Soldier_SL_F","O_Soldier_TL_F","O_Soldier_F","O_Soldier_AR_F","O_Soldier_GL_F","O_soldier_M_F","O_Soldier__F","O_Soldier_AR_F","O_Soldier_GL_F","O_Soldier_LAT_F","O_medic_F","O_soldier_exp_F"]; for "_i" from 0 to _n do { _grp = [getMarkerPos _marker, _side, _units,[],[],[],[],[_mingroupSize,_chance],0] call BIS_fnc_spawnGroup; [_grp, getMarkerPos _marker,_dist] call bis_fnc_taskPatrol; }; }; Not tested but hopefully that helps. see also http://community.bistudio.com/wiki/Control_Structures#for-from-to-Loop :)
  22. First, in your player's init line, your init.sqf, or any other init field you want really, put something like "dsarf = false;" just to initialize it. Make the condition in your trigger be simply "dsarf" (the 'true' is implicit by what is returned from the variable). Then the line "dsarf = true;" should be all that's necessary to fire it. EDIT: to be more precise, "true=dsarf" is wrong, that's an assignment to "true" of the value "dsarf", which fails because true is a universal value. To be more accurate you could do "true == dsarf" or "dsarf == true" but this is redundant.
  23. They will execute sequentially if they're both in a single thread, i.e. running from a single .sqf. You can run multiple scripts in parallel on a single machine, and use globalVariables on that machine to do this, but multiple scripts on multiple machines have to wait for the engine to get around to doing it's publicVariable updates, which I don't believe have any guarantee of speed. Edit: Global variables on a single machine are, erm, global, so do not need to be broadcast whatsoever with publicVariable. Edit 2: Was thinking about this, and perhaps an approach might be to add a global variable that, for instance, will only let the first thread go into its loop if set to 0, and only let the second thread do it if set to 1 <enforce with waitUntil>, and then have each thread adjust that variable to allow the other thread to continue when the time is right. I don't exactly know, I have never done much concurrency to begin with and certainly not on the RV engine ;)
  24. dwringer

    Make a Helicopter wait

    I think you can just give the squad a "GET IN" waypoint, give the helicopter a "LOAD" waypoint, and synchronize the two. However, the helicopter may not actually go to the ground until your squad gets to it, and it might run around trying to land next to your squad rather than at the assigned pad. What i would in a situation like this is basically do a setFuel on the helicopter to 0 so it won't go anywhere. Then, make a trigger that won't go off until the squad is fully loaded (the count of units matching the condition of not being in the vehicle should be 0). Make the trigger add fuel and it should be able to take off. You might have to change the trigger condition instead to simply wait for the squad to be within a certain proximity; I'm not sure how the AI works when telling people to get in vehicles that have zero fuel. :) Good luck; hope that helps. EDIT: Actually you can just add an extra "MOVE" waypoint for the squad just before their "GET IN", and put the refueling call into the helicopter's "LOAD" waypoint's "On Act." field, which should ensure the helicopter gets fuel as soon as the infantry squad arrives, but the helicopter won't have fuel until such time as the squad was already ordered/flagged to be ordered into the helicopter.
  25. If you guys want something that works in multiplayer, and I am saying this VERY cautiously as I have not tested it myself, there are actually specific commands called "addWeaponCargoGlobal" etc. You simply make the script run only on the server, and then use the global commands. AFAIK this is effective, modeled after a script somebody else had used. Click this spoiler to see the version I mean (does not use config files, but instead uses manually typed lists of items): <The classname aggregation was done by Pzar, and the multiplayer aspect by Riouken> To use, save as box_filler.sqf in the mission dir and then in the init field of the box, put : _handle = [this] execVM "box_filler.sqf"; ;; creates a box with default numbers of everything (50 items, 200 ammo, no bags). refill loops with a default cycle of 500s. _handle = [this, 5] ;; uses default qty's, but 5 of each bag. no loop. _handle = [this, 0, 5] ;; uses default qty's, but 5 of each special item. no loop. . . . _handle = [this, A, B, C, D, E]; <-where A,B,C,D,E are integers, spawns a crate with A of each bag, B of each item, C of each mod/attachment, D of each weapon type, and E magazines. no loop.