-
Content Count
2494 -
Joined
-
Last visited
-
Medals
Everything posted by sarogahtyp
-
Its the default icon plus a custom icon which can be drawn with https://community.bistudio.com/wiki/drawIcon3D
-
Custom map and controls script
sarogahtyp replied to negaiette's topic in ARMA 3 - MISSION EDITING & SCRIPTING
all I know bout this is zoom in/out works with RscMapControl allready. No need to add anything for it. -
How to find top of model margins
sarogahtyp replied to beeper's topic in ARMA 3 - MISSION EDITING & SCRIPTING
the script uses boundingBoxReal to find the highest point of the object. In your screenshot this is the top of the highest antenna. it is possible to detect a lower point beside the antenna with lineIntersectsSurfaces but this is an effort which Im not recommending if not really needed. Better way would be to do a manual solution for this specific object type like: _obj = objA; _obj_to_attach = objB; _height_correction = [ [ "tank1_classname", -2 ], [ "car12_classname", -1.5 ], [ "towerA_classname", -4.37 ] ]; _pos_obj = position _obj; _bbr = boundingBoxReal _obj; _p1 = _bbr select 0; _p2 = _bbr select 1; _maxHeight = abs ((_p2 select 2) - (_p1 select 2)); _index = _height_correction findIf { typeOf _obj == (_x select 0) }; if not ( _index < 0) then { _maxHeight = _maxHeight + (_height_correction select _index select 1); }; _pos_obj set [2, _maxHeight]; _attach_pos = _obj worldToModel _pos_obj; _obj_to_attach attachTo [_obj, _attach_pos]; -
Custom map and controls script
sarogahtyp replied to negaiette's topic in ARMA 3 - MISSION EDITING & SCRIPTING
provide some info! -
How to find top of model margins
sarogahtyp replied to beeper's topic in ARMA 3 - MISSION EDITING & SCRIPTING
maybe this could work for your situation (objA should be on ground during execution): _obj = objA; _obj_to_attach = objB; _pos_obj = position _obj; _bbr = boundingBoxReal _obj; _p1 = _bbr select 0; _p2 = _bbr select 1; _maxHeight = abs ((_p2 select 2) - (_p1 select 2)); _pos_obj set [2, _maxHeight]; _attach_pos = _obj worldToModel _pos_obj; _obj_to_attach attachTo [_obj, _attach_pos]; objA - the object which gets an attachment (objB) objB - the object which gets attached to objA -
Is there a way to make a trigger activate when player leaves vehicle?
sarogahtyp replied to panicsferd's topic in ARMA 3 - MISSION EDITING & SCRIPTING
player addEventHandler ["GetInMan", { hint "Player is in vehicle"; player removeEventHandler ["GetInMan", _thisEventHandler]; }]; player addEventHandler "GetInMan" removeEventHandler _thisEventHandler -> "Since Arma 3 v.1.64 the Event Handler index is available as _thisEventHandler during Event Handler code execution" -
Also even if the switch solution works I would go with another solution which should be faster especially if you add more possible tasks: _tasks_array = [ {[New_AI_Group_3, _pos_1, 500] call lambs_wp_fnc_taskPatrol;}, {[New_AI_Group_3, _pos_1, 50] call lambs_wp_fnc_taskCamp;}, {[New_AI_Group_3, _pos_1, 50] call lambs_wp_fnc_taskGarrison;}, {[New_AI_Group_3, _pos_1, 50] spawn lambs_wp_fnc_taskCQB;}, {[New_AI_Group_3, _pos_1] call BIS_fnc_taskDefend;}, {[New_AI_Group_3, _pos_1, 1000] call BIS_fnc_taskPatrol;} ]; [] call ( selectRandom _tasks_array ); It's also simpler to add new tasks with that...
-
This is nonsense. round random 5 produces integer values between 0 and 5 including 0 and 5. This is exactly what the 6 switch cases are handling. Using round random 6 means that 1/7th of all executions will do nothing because there is no case for 6 in the switch...
-
Multiple Item Replacements (Help)
sarogahtyp replied to Rosso777's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try it in onPlayerRespawn.sqf https://community.bistudio.com/wiki/Event_Scripts#onPlayerRespawn.sqf Then you should use _newUnit instead of _unit in @pierremgi's script... Also: is not a detailed description of your problem. Hard to help therefore... -
'Special' unit init field deprecated; automated "in cargo" workaround?
sarogahtyp replied to mrvibrating's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Could also be scripted with https://community.bistudio.com/wiki/moveInCargo And for flying one can also create vehicles by script with "FLY" as special parameter: https://community.bistudio.com/wiki/createVehicle -
Using Hidden Selections
sarogahtyp replied to olegreyghost's topic in ARMA 3 - MISSION EDITING & SCRIPTING
where do you see this in config viewer? In configFile >> "CfgVehicles" >> "C_Offroad_02_unarmed_F" there is no hiddenSelections entry and in configFile >> "CfgVehicles" >> "C_Offroad_02_unarmed_F" >> "TextureSources" there are the colours black, blue, brown, green, idap, olive, orange, red, white these are all except "idap" working with: -
Multiple Item Replacements (Help)
sarogahtyp replied to Rosso777's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Not embarrassing, thats just the smarter way instead of getting much more bugs/errors which force you to read biki after -
How to make a command fire over and over again
sarogahtyp replied to Joe98's topic in ARMA 3 - MISSION EDITING & SCRIPTING
that code runs every second already. if u need it to run every 5 seconds then just change sleep 1; to sleep 5; Edit: and while we are on the subject it would be much better to not run that loop if player or enemy died already: _handle = [] spawn { while {alive player and alive enemy} do { enemy move getPos player; enemy setCombatMode "RED"; sleep 1; }; }; -
Multiple Item Replacements (Help)
sarogahtyp replied to Rosso777's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Mostly its not just thinking bout but reading bout it. Thats what the biki is for... -
Get an AI unit to report its co-ordinates
sarogahtyp replied to nickmow's topic in ARMA 3 - MISSION EDITING & SCRIPTING
okay, finally I got it working. There is a big downside which can not be worked around. The problem is that there is a mic beep after each grid number. this is an effect of cfgradio. what to do to get it work on your mission: 1. create an empty file called cfgradio.hpp in your missions root folder. 2. execute the following script in debug console and wait for "Finished." in chat: 3. Now just paste the content of your clipboard into the cfgradio.hpp file by pressing CTRL+V and save the file. 4. add this to your description.ext if you don't have a CfgRadio entry there. If you have allready then add the #include line to it only. Save the file: 5 a return to Eden Editor to get the new description.ext and it's new include loaded. 5 b start mission again 5. execute the following script of @Larrow which I edited for use with the created CfgRadio entries where you like. Works in debug console as well: Now you should hear the grid position via radio. To change the channel you have to change sideRadio into groupRadio or whatever you like... Edit Removed major bug. Optimized performance for cfgradio entry getter. No game halting anymore... Added random pauses to get it sound more humanly Edit2 Dropbox links to avoid copy-paste-invisible-character-bug: saros_cfgradio_creator.sqf (use this in debug console to create needed classes for CfgRadio) cfgradio.hpp (for vanilla arma only. if u use mods which create new sounds then u have to generate your own with content of saros_cfgradio_creator.sqf) larrows_grid_speaker.sqf (use this to speak grid positions through radio) -
Renegade to attacked side only
sarogahtyp replied to vitaliy0001's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Idk what you mean with two addRatings but side relations can be set up with: https://community.bistudio.com/wiki/setFriend -
Get an AI unit to report its co-ordinates
sarogahtyp replied to nickmow's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This creates an array with classnames for use in cfgradio and the proper sound paths. For sure not the most effective solution but works: it also writes the number of entries to system chat. 7,700 ! now there has to be created a script which creates the proper cfgradio entries ... Edit: Now the class entries for CfgRadio are done. This script creates all entries for all sounds which could be used by larrows script. Just execute it in debug console and paste your clipboard content into cfgRadio after that... Next thing to do is to rewrite Larrows script for CfgRadio usage... Edit: dont use scripts of this post. They have a major bug. go with the next post instead... -
Get an AI unit to report its co-ordinates
sarogahtyp replied to nickmow's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This is by far not enough. Larrows script crawls hundreds thousands and thousands of different possible sounds in configs for each possible speaker (and their languages) and for different behavior types. You can't just create 10 entries in cfgradio to get it work. Larrow did a generalized solution. Edit: I counted all at least needed cfgradio entries. These are 7,700 ! -
Get an AI unit to report its co-ordinates
sarogahtyp replied to nickmow's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This can not be done by simply changing cfgvoice to cfgradio... Someone has to write a function which creates entries for cfgradio for each sound. Those entries have to be copied into cfgradio in description.ext then. After that larrow's function has to be rewritten for use on those cfgradio entries. This is not an easy task... -
Is there a weapon example p3d anywhere I can use??
sarogahtyp replied to HardernTim's topic in ARMA 3 - QUESTIONS & ANSWERS
I guess you should have posted this here: https://forums.bohemia.net/forums/forum/165-arma-3-modelling-o2/ or here: https://forums.bohemia.net/forums/forum/162-arma-3-addons-configs-scripting/ cause there are reading the guys who know what to do ... You could contact a moderator by clicking "report post" on the upper right corner of your own post. Just write there where you want to have moved this thread to. -
Will-my-pc-run-Arma3? What cpu/gpu to get? What settings? What system specifications?
sarogahtyp replied to Placebo's topic in ARMA 3 - GENERAL
or just the other way around. planned system: Gigabyte GeForce GTX 1660 Gaming GAMING OC AMD Ryzen 5 5600X ASUS ROG Strix X570-E Gaming ATX Motherboard Corsair Hydro H45 Water Cooler Corsair Carbide Series 270R Case which 32 GB RAM Kit would you recommend? Edit: graphics corrected from 1650 to 1660 -
Multi-dimensional Array [ getItemCargo ]
sarogahtyp replied to RyanTurner's topic in ARMA 3 - MISSION EDITING & SCRIPTING
easiest way is to use copyToClipboard and str copyToClipboard str _array; after that u just paste it in a file... -
Will-my-pc-run-Arma3? What cpu/gpu to get? What settings? What system specifications?
sarogahtyp replied to Placebo's topic in ARMA 3 - GENERAL
could you pls post the model number of that RAM? Im looking for good ram for my future setup and this is exactly what u wrote... Edit: should be this one, right? BL2K16G36C16U4WL -
Multi-dimensional Array [ getItemCargo ]
sarogahtyp replied to RyanTurner's topic in ARMA 3 - MISSION EDITING & SCRIPTING
for sure but not if u have to add 2 other loops to have it working... but I understood it was an example -
Multi-dimensional Array [ getItemCargo ]
sarogahtyp replied to RyanTurner's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This looks neat and all but aren't you create 2 loops (apply and find) which are not needed? @pierremgi _array1then2 = getItemCargo cursorObject; _array12pair = _array1then2#0 apply {[_x,_array1then2#1#(_array1then2#0 find_x)]}; {nextCrate addItemCargoGlobal _x} count _array12pair; why not using the original array for filling the 2nd crate? _array1then2 = getItemCargo cursorObject; { nextCrate addItemCargoGlobal [ _x, (_array1then2 select 1 select _forEachIndex) ]; } forEach (_array1then2 select 0); not tested. Maybe I ve overseen something but this looks simpler and faster to me ...