Jump to content

Sparker

Member
  • Content count

    16
  • Joined

  • Last visited

  • Medals

Community Reputation

18 Good

About Sparker

  1. Thank you for making this! I've been using your plugin for a while and I must say it does a great job!
  2. How do you check if they are disturbed or not? You can check their behavior with this command: https://community.bistudio.com/wiki/behaviour Their default behaviour is usually AWARE. After they have spotted an enemy, it changes to COMBAT. Once they forget about their enemies(~ 3 minutes when the enemy is out of sight, must be fastrer if they just kill all enemies) the behaviour switches back to AWARE and you can order them to get into their vehicles.
  3. Yes, unless the script has been suspended with waitUntil or sleep. Now, If I have the majority of scripts suspended and a single one running an intense piece of code, the scheduler will mostly spend time executing this script while quickly checking and moving other suspended scripts to the top of the queue. So, I could say that 99% of scheduler's resource is utilized by this single script. Did I make a mistake anywhere? Of course a different way to estimate scheduler load is to measure execution time of everything between suspension statements, but it would still be hard to see the whole picture of how multiple scripts run concurrently. What If I have scripts that are made by other authors and I want to see their impact on performance? Another method I'm aware of is to spawn some script that does something and see how many seconds it takes the script to reach the top of scheduler queue. It is very strange that such a feature is not built into the game engine, considering that we have some diagnostics functions. I hope it will be implemented in the future.
  4. Hello! As ARMA's scripts spawned inside the scheduler behave as separate threads, it seems logical to me to have a way to estimate how much percents of total scheduler run time is taken by every spawned script, similar to what a task manager in any OS shows for started processes. Am I missing something, or is there really no such feature in ARMA? Thanks!
  5. I've tried the script and I like it very much! Well done!
  6. Vcom AI V2.0 - AI Overhaul

    I think there is a Github repository for VCOM: https://github.com/genesis92x/VCOMAI
  7. Sorry I don't quite know how remote control works in Arma, but it is in Antistasi and you can check how it's implemented. I've had some success customizing my units through the modified arsenal by remote controlling them. In Antistasi, you have to recruit some guys through the flag's menu at the HQ, then select one, press Y button and search for temporary AI control.
  8. Well if you remote-control AI and open the arsenal, then i think, yes. Or do you want it to work another way?
  9. Well at start you have some stuff in the crate's basic inventory. Go to arsenal, push 'to crate' button and the stuff from 'inventory' will get transfered to 'arsenal' and you can play with it. Some are infinite, yes, this is done on purpose for basic items.
  10. Yes, by 'items' i mean fixed amount of each item. The way you've described it is exactly how it works. https://github.com/A3Antistasi/antistasiofficial Check folder called 'JeroenArsenal'
  11. Check 'Antistasi' mission. Jeroen Notenbomer, our friend, has implemented the arsenal with finite amount of items by modifying the existing Arsenal.
  12. That's an amazing project! I like how much effort you've put into these interiors. They look great! If you don't mind, a question just for my own curiosity, why are you using triggers to detect player presense? What benefit do they give for solving the 'player presense' problem compared to a scripted solution?
  13. How did you get those numbers? 0.016(seconds)*300(meters/second) gives only 4.8 meters/frame for 300m/s shell and 13 meters/frame for the high velocity MRLS rocket. Anyway, by coincidence I've made a similar script a few days ago(To spawn an AI base if the player wants to mortar it). It uses the method proposed above, but it turns out that per-frame timing is excessive. First we can check with rather long time intervals(~1 second) until the mortar shell ascends to its apogee. Then we check with 0.1 time intervals the time until the mortar shell falls. I estimate it by dividing shell's altitude above the ground by it's vertical velocity. When the time is below some threshold(say, 8 seconds, but you can use a lower one for your case) we can roughly estimate where it's going to land by taking its current horizontal velocity and multiplying it by the estimated time-to-explosion(a linear approximation). Note that this gives higher errors if the shell is travelling above mountains. The method works not bad, but it depends on how big is the zone you want to 'protect'. You can tweak the timing constants to get more precision. If you want super high precision, i think I've seen a function that can tell you where a given line will intersect with terrain. Also the code comes with a bonus: it filters out the HMG/GMG turret fire by arma's default artilleries.
  14. Hi! I was looking for a similar "catch all" script and found this thread. Sinse beno_83au didn't find what he was looking for, i thought i'd share what I've achieved. The suppressor's value is located at configfile >> "CfgWeapons" >> _attachment >> "ItemInfo" >> "AmmoCoef" >> "audibleFire". My main trouble was the russian weapons from RHS. There are muzzle attachments in RHS which are in fact not silensers(flame suppressors or smth. like that), so they have "audibleFire" set to 1.0. Normal silencers typically have "audibleFire" below 1.0,:0.04 for standard silencers and 0.4 for RHS silencers. That's how we can filter out these 'fake silencer' attachments. For builtin silensers, the "audibleFire" from weapon's ammo seems to be a reliable indicator if the weapon is silenced(check the table in the code below). So, here's the function if someone needs it:
  15. Get road type?

    i also came across this thread and your idea to use isOnRoad is very good! So I made a similar function. It takes into account the direction of a road, then starts probing it with isOnRoad in both directions orthogonal to the direction of the road and returns decent results for segments of a road facing anywhere. I hope it's of any help. Also an interesting thing I've learned, the position returned by nearRoads is not always in the middle of the road, but the isOnRoad does its job well(in terms of symmetry). On the picture, blue arrow is the middle point returned by getPos road, and pink arrows show how isOnRoad works. Picture link: steam screenshot /* Measures the width of a road object with given precision paramerets: [_road, _precision, _maxWidth] _road - road object acquired by nearRoads _precision - the precision with which to find the width _maxWidth - the maximum width. If the road is wider, the return value will max at _maxWidth return value: number, road width or 0 if wrong road object was given Author: Sparker */ params [["_road", objNull, [objNull]], "_precision", "_maxWidth"]; if(isNull _road) exitWith {"Road is null"}; //Wrong data was given private _connectedRoads = roadsConnectedTo _road; private _numConnectedRoads = count _connectedRoads; if (_numConnectedRoads == 0) exitWith {"Road is not connected to anything"}; //Connected road not found, can't calculate direction private _direction = 0; if(_numConnectedRoads == 1) then //If it's the end of the road { _direction = _road getDir (_connectedRoads select 0); diag_log "Detected one connected road"; } else //Else approximate the direction by the direction between two nearest segments { _direction = (_connectedRoads select 0) getDir (_connectedRoads select 1); diag_log "Detected two connected roads"; }; //Spawn an arrow facing the road private _roadPos = getPos _road; //Create arrow for debug //_arrow = "Sign_Arrow_Blue_F" createVehicle _roadPos; //_arrow setVectorDirAndUp [[0, 0, 1], [sin _direction, cos _direction, 0]]; //Get orthogonal direction private _cos = cos (_direction+90); private _sin = sin (_direction+90); private _vectorDir = [_sin, _cos, 0]; //Find road width in one direction private _checkPos = _roadPos; private _testWidth = 0; private _width = 0; while {(_width <= _maxWidth) && (isOnRoad _checkPos)} do { _width = _width + _precision; _testWidth = _testWidth + _precision; _checkPos = _roadPos vectorAdd (_vectorDir vectorMultiply _testWidth); //Create arrow for debug //"Sign_Arrow_Pink_F" createVehicle _checkPos; }; //Find road width in another direction _testWidth = 0; _vectorDir = [-_sin, -_cos, 0]; //Rotate the vector 180 degrees _checkPos = _roadPos; while {(_width <= _maxWidth) && (isOnRoad _checkPos)} do { _width = _width + _precision; _testWidth = _testWidth + _precision; _checkPos = _roadPos vectorAdd (_vectorDir vectorMultiply _testWidth); //Create arrow for debug //"Sign_Arrow_Pink_F" createVehicle _checkPos; }; _width
×