crewt
Member-
Content Count
129 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by crewt
-
Jets - Sensor overhaul (Radars, IRs, Lazors, PGMs)
crewt replied to oukej's topic in ARMA 3 - DEVELOPMENT BRANCH
Dump- 957 replies
-
- electronic warfare
- radar
-
(and 8 more)
Tagged with:
-
This would be better, if this works with you TheArr = profileNamespace getVariable ["XX_TheArr", ["GdtAsphalt","#GdtStratisForestPine","#GdtStratisConcrete","#GdtStratisRocky","#GdtRocks"]]; BadArr = profileNamespace getVariable ["XX_BadArr", []]; if (surfaceType _unit in BadArr ) then { // Make stuff } else { if (surfaceType in TheArr) then{ private _a = ["City", "Asphalt", "Road", "Street", "concrete", "rock"] apply {toLower _x}; for "_i" from 0 to count _a -1 do { _idx = (toLower (surfaceType _unit)) find (_a select _i); if (_idx != -1) then { TheArr pushBackUnique (surfaceType _unit); profileNamespace setVariable ["XX_TheArr", TheArr, false]; } else { BadArr pushBackUnique (surfaceType _unit) profileNamespace setVariable ["XX_BadArr", BadArr, false]; // Make stuff -> Would be nice if this would be a fnc }; }; }; }; Global Var isn't a must, depends on your preferences. and where this stuff runs.
-
You could predefine a list in a Global Var and, add names, I imagine something like: Not sure what method you use, most likely a onFrameHandler? You could integrate this easily. I haven't tested this in any way, so... might be a typo in there somewhere. Ha! better Idea. Save it in the Namespace, so you can take the list with you from mission to mission! Was a shitty piece of code anywhere, would have run every time when you could leave a footprint. Just a secound...
-
Hey, as I needed them once, I looked up some of my code and found those: Later I realized that there is basically an unlimited amount of surfeces, as modders can create their own. So you will find different surfacetypes on nearly every map. Might be wise to define where the footprints are not shown and include everything else. :-/
-
How to set max distance a unit can be from another one?
crewt replied to 4K.Scar's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Jep. But again, I saw that the original Post was about Inf, so this is not for this topic. Sorry for that, must have misread the problem -
How to set max distance a unit can be from another one?
crewt replied to 4K.Scar's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sorry, that was from the phone, sadly this cmd is not explained in the BI forum jet, but was mentioned in the AI driving Topic and is already in-Game, so its worth a try. If you can't find something like that, take a look into the Debug console in Arma 3. if you do so, it will suggest the Syntax for you: vehicle setConvoySeperation distance Syntax is easy enough, if you edit the init: vehicle is this, distance is a Number Never mind, doesn't suit your specific purpose. -
Vcom AI V2.0 - AI Overhaul
crewt replied to genesis92x's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The thing is simple, the problem is not VCOM, but Battleeye and remoteExec. On default, you have to whitelist every function that is executed by remoteExec. If you whitelist mentioned fnc, VCOM should run, (execpt there are other functions) Nevertheless, as I don't know Wasteland stuff, the client shouldn't run VCOM, as they don't have Units right? If the Server is the only owner of AI, only the Server should have VCOM -
How to set max distance a unit can be from another one?
crewt replied to 4K.Scar's topic in ARMA 3 - MISSION EDITING & SCRIPTING
setConvoySeparation -
How make trigger that is activated only by a player designated ? (player ID)
crewt replied to ALPHIVE's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Edit.: Wont work in SP, as an UID is then "SP" -
Headless Client Script for all AI
crewt replied to fathersarge's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Glad to hear :) Cheers -
How make trigger that is activated only by a player designated ? (player ID)
crewt replied to ALPHIVE's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Condition: "12345678" in (thislist apply {getPlayerUID _x}); Any player would be the activation type. Should work if I didn't bring a typo somewhere. -
Vcom AI V2.0 - AI Overhaul
crewt replied to genesis92x's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@HIHBGaming You have battleeye enabled and you are not allowed to exec the mentioned fnc? Here you can whitelist fncs -
[SOLVED]Problem: AI find and kill players.
crewt replied to shambler's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Assuming you have one group of AI's and they are supposed to hunt down all of the Players: normally I assume that you attempt with the destroy WP was correct. did you attach the WP to the player? If not, they might got the task from the game to destroy the nearest Object they can find next to the Object. IF the solution above doesn't work: I would try to reveal the Targets to the AI on a regular bases. -
Calculating the distance a Bomb would travel.
crewt posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey there, as I reached the limitation of my physic knowledge, I require some help from you :/ I currently work on some Commander that is capable to manage all given Units etc. So far, quite satisfying, but for more than a week now, I struggle with a problem. My current goal is to the 'last' AI support module, to get undirected bombs into a Target (Or more at a certain Position). So I have a stable flight height ( Thanks to flyinHeightASL). I don't want direct Hits, but for a stationary Target it should hit at a 10^2 m radius. This is the fnc written to calculate the impact distance, witch is for some reason always around 200-270m to short. As I don't want to just add 200m, as It would be a messy solution. Any Idea why the Bombs come to short? Maybe the Airfriction in arma or, the possibility of bombs to glide ? If so, any Idea how to add these factors? /* Parameter: 0: Vehicle - Plane 1: String - Weapon 2: Number - Targetheight (ASL) */ params ["_veh", ["_weapongiv", "", [""]], ["_targetpos", 0]]; if (_weapongiv == "") then { _weapongiv = if ( ([_veh] call CR_gcmd_getBomb) isEqualTo ["",0]) then { ([_veh] call CR_gcmd_getBomb) select 0 } else { currentWeapon _veh }; }; private _magazine = ""; private _initSpeed = -0.0005; private _airFriction = 0; private _magazines = getArray (configFile >> "CfgWeapons" >> _weapongiv >> "magazines"); if (count _magazines != 0) then { _magazine = _magazines select 0; private _ammoName = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo"); _initSpeed = getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); //_airFriction = getNumber(configFile >> "CfgAmmo" >> _ammoName >> "airFriction"); }; private _g = 9.80665; private _v = vectorMagnitude (velocity _veh) + _initSpeed; private _degrees = (_veh weaponDirection _weapongiv) select 2; private _h = (getPosATL _veh select 2) - _targetpos; private _tF = sqrt((2*_h)/_g); private _acc = _tF * _g; private _sD = (_v + _acc)*_tF; _sD Some Values to mess with: Weapon: "GBU12BombLauncher_Plane_Fighter_03_F" magazine: "2Rnd_GBU12_LGB" Ammo: "Bo_GBU12_LGB" InitSpeed: 0 Airfriciton: -0.0005 Any help (or suggestions) is really appreciated :) -
Calculating the distance a Bomb would travel.
crewt replied to crewt's topic in ARMA 3 - MISSION EDITING & SCRIPTING
From what I can tell it manages the alignment of the bomb, as well the stabilizing in flight direction. At least according to the C++ code provided by t_d -
Headless Client Script for all AI
crewt replied to fathersarge's topic in ARMA 3 - MISSION EDITING & SCRIPTING
yes As you are using Alive, I would recommend unsing the CBA version, then every 30 sec. -
Calculating the distance a Bomb would travel.
crewt replied to crewt's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sorry, came home t late, a general sweet solution, config , if you are to lazy to open up arma or simply can't . airFriction = -0.0005; sideAirFriction = 0.1; Even coefGravity isn't an config entry -
Headless Client Script for all AI
crewt replied to fathersarge's topic in ARMA 3 - MISSION EDITING & SCRIPTING
if (!isServer) exitWith {}; _HC = owner HC; //"HC" denotes the name of the unit in-game waitUntil {!isNil "HC"}; ["HCS_addToHC", "onEachFrame", { if (isPlayer _x || (_x in units group _HC)) exitWith {}; if (isNull _HC) ExitWith{}; { _x setGroupOwner _HC; //adding all units that aren't player or aren't already under HC to HC }forEach allGroups; }] call BIS_fnc_addStackedEventHandler; In theorie this shouldn't throw any You tried pointing to an Object with a String ("HC") and isplayer was missing an Object. No need for an onEachFrame btw. if you have CBA running there are way better options But I would: ["HCS_addToHC", "onEachFrame", { { if (isNull HC) ExitWith{}; if (!isPlayer (leader group _x)) then { (group _x) setGroupOwner HC; }; }forEach allUnits - allPlayers - entities "HeadlessClient_F"; }] call BIS_fnc_addStackedEventHandler; Use this instead. If you are using CBA: -
Calculating the distance a Bomb would travel.
crewt replied to crewt's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No need to be sorry, thank you for your help and very useful tips! For the moment I still refuse to accept that I can't solve this. But hey, everyone knows that the bombs in Arma don't fly like in RL, (Btw.: maybe the jets Dlc will make something about that.... ), and this topic certainly gave me some strange WTF moments. My next attempt will be to test the fall of the bomb, maybe BIS decided, that bombs really would adjust to glide angle after an certain amount of Time, that would be an usefull constant to work with, the Math from that point is pretty strait forward. IF I find a solution I can life with, I will post it ASAP :P -
Calculating the distance a Bomb would travel.
crewt replied to crewt's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So - Run your little code: Raw: Google Docs: -
Calculating the distance a Bomb would travel.
crewt replied to crewt's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The major Problem for me is still the weight, can wrap my head around that one. If Bohemia is acc calculating the Bombs by the function t_d provided, they must have some kind of Weight/Mass, or the entire function is... useless. basicly. Most likely relative to the vector of the Bomb? -
Calculating the distance a Bomb would travel.
crewt replied to crewt's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No it's the magnitude, shit, should have thought about that earlier. I have to make a test applying G_force to the individual velocitys. -
Calculating the distance a Bomb would travel.
crewt replied to crewt's topic in ARMA 3 - MISSION EDITING & SCRIPTING
But 220 kindof is? Except if its not the maximal Speed more of the maximal acceleration -
Calculating the distance a Bomb would travel.
crewt replied to crewt's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Mit Home either: data was ASL every 0.5sec , getMass returns 0 on plane or not, maxspeed was 100 (default for bombs) so it seems to break that speed. Will be home in nearly an hour, than I can give you more. -
Calculating the distance a Bomb would travel.
crewt replied to crewt's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This project keeps reminding me why I hated physic back in school. Would be simple, isn't as it only applies for something that can't ever happen. But, from what I can see at this point, all this information combined might work. The Script from sarogahtyp has to be transformed because I search for the distance, but as I'm still missing the Thrust, witch I have to replace with well the not existing G_force, witch I hopefully can get from this nice C++ code. ( Witch again calculates with not existing Mass -.- ). If I don't have any thrust, the bombs would fall around 200 m, at a release speed of 440m/s and an altitude of 700m. So the missing Part is the Thrust. But From what I have, it looks promising. But before I can tell for certain, I have to test it. again. Anyway thanks a lot, as soon as I have a solution I will post it here :P @t_d Where did you get that code? Any chance for more where that come from? :)