Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

14 Good


About loyalguard

  • Rank
    Master Sergeant

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I know it has been several months since I have provided an update. Rest assured, work continues. I had to take a several month break this summer for personal reasons, but have been working diligently since the 1.0 release to try to provide a realistic yet practical implementation of AEG for A3. I do not need to tell anyone here how massive Altis is in comparison with previous ArmA worlds. Previous versions of AEG only had to work with dozens of objects. The A3 version has hundreds to consider. I am trying to model the grid so it is realistic, easy to interact with, not overly resource intensive on server and client CPUs, and bug free. The macros I have created to automatically plot out electrical grids is helping tremendously, but there is still a lot of tweaking required to make it practical. More updates soon!
  2. Wow! That is beautiful and makes complete sense. Since functions are now always loaded versus having to put down a functions module, this is great implementation method. That's what I get for taking three months off from coding. Thanks to you and Deadfast for highlighting it.
  3. Another great initiative .kju! I have often thought of properly documenting a similar tutorial dealing with script only addons, that is, no replacement or addition of weapons or vehicle classes...purely an addon that launches a script or scripts similar to how Kylania and I describe in this thread: how do you make a script into a mod? I know al lot of the process is already documented in the CBA wiki at DevHeaven, but I think having in the Biki specifically would be helpful as well. If there is concurrence, I will create one following your template for replacement configs.
  4. Just to chime in as well as Mr_Centipede stated, I also recommend that script wins over addon in order to preserve mission maker intentions. This is the way that I have made my electrical grids simulation work in the past. There are some tricks to getting it to work correctly though such as trying to make sure the script version runs first so if a second instance is detected (the addon version) then the second is aborted. Not the only way to do it, but the easiest in my opinion. Let me know if you decide to pursue and I can share some sample code.
  5. New method works great! I plugged the new code in and instant success!
  6. See first post for a new update video (#3). I had noticed that none of the airport, communications, or transmitter towers had warning lights on them (at least in the Alpha -- I know there is still a lot of lighting work in progress) so I added some red light sources to them that can be controlled by the grid. These are scripted only and do not involve config or model changes. The light settings still need a lot of tweaking (brightness, ambient, etc.) but I am not going to do too much with them until the lighting is more finalized. Again, my video settings are optimized for development, not rendering. EDIT. And......of course less than an hout after I post my update adding lights to towers BIS has done it organically!!!!!!!!! No worries, I am happy to see them officially in game. I can easily adjust the code to turn theirs on and off to to get the best of both worlds!
  7. Wow! That is fantastic Tilion! Thank you! I understand that it is not final and I will remain flexible. I cannot wait to modify my code to take advantage of this. This type of feedback and attention is what makes BIS so great!
  8. I have not checked the latest dev builds, but at least in the stable branch, the switchLight command to turn off street lamps is not yet working in the Alpha. Once it does, my AEG - ArmA Electrical Grids Script Pack and Addon for ArmA 3 will help you accomplish that easily. In the meantime the only option is to use setDammage or hideObject to destroy or hide them.
  9. See first post for a new update (#2) and another video. Like in the A2 version, I have added the mission maker option to require players to use a password (mission maker chooses the password) to access the grid control system. In keeping with A3 taking place a few decades from now, before a player enters the password, the system attempts to use facial recognition to authenticate access. It is just for show to increase immersion, but it is a neat effect and another example of using the new PiP feature to display a live image on screen (in this case in a dialog). It still needs some tweaking such as hiding the player's view between the logon screen and the system screen and of course there are no computer objects yet in game so I am "logging in" from a cash register, but is fully functional otherwise.
  10. I do not use a sound source, I have a game logic use "say" or "say3d" since it is invisible and deleteVehicle works without a problem. ---------- Post added at 11:08 ---------- Previous post was at 10:44 ---------- Here is a simple version: // Create side and group for logics if no already existing side or group. _side = createCenter sideLogic; _group = createGroup sideLogic; // Create a global variable (public if necessary) to determine when to play a sound. myBoolean = true; // Create a game logic at the desired position and give it a name. "Logic" createUnit [[0,0,0, _group, "mySoundLogic = this;"]; // Play the sound (make sure it is defined somewhere like Description.ext, a config file, etc.). while {myBoolean} do { mySoundLogic say ["mySound",5]; // "Say" the sound. sleep 5; // Adjust delay to match length of your sound. }; // When you want to stop the sound, make the variable false and delete the logic (it does not have to be the same script) to make it stop immediately.. myBoolean = false deleteVehicle mySoundLogic;
  11. In AEG I have game logics use the say command to play the sound and then deleteVehicle the logic when I need it to stop. It stops immediately. I then re-create the logic if I need to start the sounds again.
  12. There is a function called BIS_fnc_relPos that you should look. You pass to it an object or position (in your case Object A), a desired distance, and a direction in degrees. If you combine this function with BIS_fnc_randomInt, you can randomize the distance and direction each time object B spawns. Example: private ["_distance", "_direction", "_randomPos"]; _distance = [1,500] BIS_fnc_randomInt; // Random distance between 1 and 500m. _direction - (0,359] BIS_fnc_randomInt; // Random direction between 0 and 359 degrees. _randomPos = [myObject, _distance, _direction] call BIS_fnc_relPos; // The position at the random distance and random direction from myObject (rename myObject as required).
  13. the find command returns the index of the first element it encounters in the array, not all of the elements. So, assuming there is a match, count will only ever be 1. So, when I read your first post I assumed you were looking for names of vehicles, not actual class names. If you are looking to simply count the number of a certain type of vehicle, that is a differrent process. What exactly do you want to know?
  14. So what you want to do is find a string within a string. There is an A3 BIS function for this called BIS_fnc_inString but that does not help you in A2 unless you re-create it. There is a CBA function (for A2 and A3) called CBA_find that will also find a string within a string. If you do not want to use CBA you could create your own "find a string in a string" code. Since you know exactly what you find, here is a simple way to do that. It is a little messy but it is quick and should work (but is untested). // Set Scope private ["_unicode", "_vehicleCount", "_string", "_array"]; // Init ServerVcls (unless this is done somewhere else). ServerVcls = ["Atv_1", "Atv_2", "Atv_3"]; // Init priave variables needed later. _unicode = [41,74,76]; // A, t, v in Unicode (case-sensitive) _vehicleCount = 0; // A count of the times an instance of "Atv" is found in ServerVcls // Loop through all of the elements of ServerVcls using forEach. { _string = _x; // Get the (next) string value of the selected element in the array ServerVcls. _array = toArray _string; // Convert the String into an array. //If the array is more than three elements then it could start with "Atv". if (count _array > 3) then { // If the first three elements of _array equal the first three elements of _unicode then the string begins with "Atv" and increment the vehicle count. If ((_array select 0 == _unicode select 0) && (_array select 1 == _unicode select 1) && (_array select 2 == _unicode select 2)) then { _vehicleCount = _vehicleCount + 1; }; }; }; forEach ServerVcls; You can make this cleaner by extracting the first three elements in _array and then converting it back to a string using toString then just compare strings instead of array elements.
  15. loyalguard

    Clean up script?

    You could try the super class "ReammoBox", "ReammoBox_F", and "WeaponHolderSimulated" as they also appear to be superclasses of different weapon holders.