wolf5 13 Posted January 9, 2012 ok, i got a solution Put a Caesar in init.sqf, classname "OFrP_Canon155mm_TRF1" then in init_server.sqf add: //ARTY { private ["_pos", "_class", "_callsign", "_unitCount", "_rounds", "_code", "_roundsUnit", "_roundsAvailable", "_canMove", "_units", "_grp", "_vehDir"]; _pos = _x select 0; _pos set [2, 0]; _class = _x select 1; _callsign = toUpper (_x select 2); _unitCount = round (_x select 3); if (_unitCount > 4) then { _unitCount = 4 }; if (_unitCount < 1) then { _unitCount = 1 }; _rounds = _x select 4; _code = _x select 5; _roundsUnit = _class call NEO_fnc_artyUnitAvailableRounds; _roundsAvailable = []; _canMove = if (_class in ["MLRS", "GRAD_CDF", "GRAD_INS", "GRAD_RU"]) then { true } else { false }; _units = []; _grp = createGroup _side; _vehDir = 0; for "_i" from 0 to (_unitCount - 1) do { private ["_vehPos", "_veh"]; _vehPos = [_pos, 15, _vehDir] call BIS_fnc_relPos; _vehPos set [2, 0]; _veh = createVehicle [_class, _vehPos, [], 0, "CAN_COLLIDE"]; _veh setDir _vehDir; _veh setPosATL _vehPos; _veh setVehicleInit " this removeweapon ""OFrP_155mm_Caesar"";this removemagazine ""OFrP_18Rnd_155_HE"";this removemagazine ""OFrP_18Rnd_155_HE"";this addweapon ""M119"";this addmagazine ""30Rnd_105mmHE_M119"" "; [_veh, _grp] call BIS_fnc_spawnCrew; _veh lock true; _vehDir = _vehDir + 90; _units set [count _units, _veh]; [nil, _veh, "per", rAddAction, "Talk with Artillery Crew", "scripts\NEO_radio\radio_action.sqf", "talkarty", -1, false, true, "", "_this distance _target <= 5"] call RE; }; It work fine with ACE Share this post Link to post Share on other sites
seyv 10 Posted January 9, 2012 spawn but don't work Share this post Link to post Share on other sites
wolf5 13 Posted January 9, 2012 don't know, it work for me Share this post Link to post Share on other sites
d3lta 10 Posted January 12, 2012 Hi NEO, congratulations for your script, Do you have compatibility with ACRE (differente radio names) ? Best Regards Share this post Link to post Share on other sites
metralla 19 Posted January 12, 2012 This script long since I realized that they could make and would be very useful for the Gun, now that it is necessary to make it more easy to implement, It's great script and it works great ... This script could make a module for easy installation in missions? It is quite difficult to modify the script according to need and map, could make it more easily integrated as a module or as any other mod? It is my humble opinion, just that thanks. :bounce3: Share this post Link to post Share on other sites
Teomo 1 Posted January 12, 2012 (edited) http://img11.imageshack.us/img11/5152/supportradio.jpg Do not quote images! Name: Support Radio Developer: _neo_ Version: 1.00 Credits: Deto for the logo image, Osmo, Mr Ben, Outlander, Igmmig and all other Tour members for the great ideas, suggestions, feedback and testing Videos: Images: Image 1 - Image 2 Download: Support Radio - Example Mission - Armaholic Mirror Description Support Radio is a interface that will help you control Artificial Intelligent units for support such as Transport (Air Taxi), Close Air Support and Artillery. Only units with an itemRadio and itemGps can access the Support Radio. Transport: Move - Make unit move to location and wait for further orders Land - Make unit land at given location, if LZ is not safe enough, unit will find a near but safe LZ Land (Eng Off) - Same as Land Task but unit will shutdown the engine Circle - Make unit go to location and circle the area giving overwatch Pickup - Make unit go to LZ, the unit will wait for visual on friendly smoke and will ask if it is correct smoke, player needs to use interface to confirm the smoke or that is wrong smoke When inside a Transport unit you can talk with the pilot, where youll be able to control that vehicle only Close Air Support: SAD - Seek and destroy enemy targets and unit will also engage all laser marked targets Support for both planes and choppers Artillery: There are two types of Artillery batteries, static and non-static If the battery is non-static it will be able to move around the map to get in range of target, it will wait for player interaction before doing so When near a artillery unit you can talk with the crew, where youll be able to control that artillery group only Installation: Readme (Included in download links) _neo_ >>>>>>>>>>>>>>>>>>>>>>>How to set that only one person? Edited January 12, 2012 by Foxhound quoted picture removed Share this post Link to post Share on other sites
mia389 10 Posted January 13, 2012 Well thank you for the reply Neo. By Reading this code I can see how this function would respawn a specific support unit, but I dont know how to go about adding it/executing that command, any pointers :)? I have same issue. Im not sure how to use the code to get them to respawn. Im guessing a trigger with an event handler but I cant figure it out. Anyone get respawn to work? If so please post an example Share this post Link to post Share on other sites
malakdecaen 3 Posted January 21, 2012 hi and thanks for you'r scripts , i have a bug with tha A10 , after RTB the A10have engine off ok and if i use A10 again , the A10 don't move !! it is possible respawn the A10 to position after RTB ? thanks a lot for you'r reply Share this post Link to post Share on other sites
gatordev 219 Posted February 4, 2012 Thanks for the feedback,This will be "fixed" in next version, although, if you want to fix it before that, add the following to the units init line that need the action: Code: dummy = this spawn { if (local _this) then { waitUntil { !isNil { NEO_radioLogic } }; waitUntil { !isNil { NEO_radioLogic getVariable "NEO_radioPlayerActionArray" } }; _this addAction (NEO_radioLogic getVariable "NEO_radioPlayerActionArray") }; }; Works! Thank you so much. I'm still struggling with this. I'm putting the scrips in the mission folder and running it as the demo mission indicates. As "Player," it works perfectly, but if I put the code into the init field of my "2" (as "Playable") then switch to "2" and kill the leader, I don't get the Support Radio option. Does it not work this way? I think I've tried it where, as "1" I went and sat on a grenade, died and then moved to "2" and still had the same issue. This is a great addition, so thanks for your efforts. Please don't take this as a negative, I'm just trying to get it to work for other playable units. Share this post Link to post Share on other sites
grande1982 10 Posted February 24, 2012 Hello, very nice script and easy to configure. thanks. I have 2 questions: 1-How to use the laser artillery?. 2-Laser can be used with SAD? .How is it done? Share this post Link to post Share on other sites
ck-claw 1 Posted March 3, 2012 (edited) Nice set of scripts! easy enough to use and add into any mission! Does exactly what it says on the tin :) Edit:- take that back- i must be missing something? moving it to another island is not working??? Edit 2 :- thinks it was a merging error with init/description files? lol Edited March 4, 2012 by ck-claw Share this post Link to post Share on other sites
louderthanu 10 Posted March 14, 2012 Thank you for this set of scripts! Great job thinking the processes out. My only comment is with the documentation. You are clear on usuage and fuctionality- but implementation is a bit hazy. My questions are not necessarly about your code and fuctionality, but rather to get your opinion how to modify the modifications I've made to it <g>! To respawn an asset after it is destroyed I've added the following event handler to the "Code To Execute" parameter in the array in "NEO_coreLogic" for each asset. I made the apperaently correct assumption that "Code To Execute" was analogous to the init field: _EHkilledIdx = _this select 0 addEventHandler ["killed",{handle = ["alpha0"] execVM "scripts\NEO_radio\neo_respawn_transport.sqf"}] On the vechicle's death, a script is triggered in which I take the passed variable to determine which vehicle I'm dealing with and populate a series of variables that I then pass to the NEO_fnc_radioSupportRemove then the NEO_fnc_radioSuppotAdd functions. Example: //determine asset & populate variables switch (_mkr) do { case "ab1": { _mkrName = "NEO_mkr_cas_ab1"; _dir = 180; _class = "AH64D"; _callsign = "AH64D Airbase"; _airport = 0; }; .... and so on.... }; //Remove Old [ WEST, "CAS", _callSign ] call NEO_fnc_radioSupportRemove; //Add New [ WEST, "CAS", [ getMarkerPos _mkrName, _dir, _class, _callSign, _airport, {_EHkilledIdx = _this select 0 addEventHandler ["killed",{handle = [_mkr] execVM "scripts\NEO_radio\neo_respawn_cas.sqf"}]} ] ] call NEO_fnc_radioSupportAdd; This works perfectly about 80% of the time... but sometimes I get the vehicle with no crew, which of course renders the asset "inoperable". Sometimes the vehicle is damaged during an attack at it's base but is not destroyed causing the crew to disembark. Maybe one dies, maybe all die... but they're no longer in the vehicle, rendering the asset "inoperable". Often, after another attack wave, the vehicle will finally get destroyed but the crew that were standing around the vehicle (they got out after the vehicle was damaged the first time) will survive. The vehicle will repawn, crewless. First, is my implementation roughly how you intended the delete/respawn functions to operate? You've not been clear about the usage, just the syntax. If I've totally gone off in left field- could you give me an example of how you'd intended this feature to work? Secondly, what would you or anyone else suggest to "do" about the crews abandoning a damaged vehicle? It would appear that they become a different group entity when they do that? What is a good way to delete them and ensure I get a crewed vehicle on a respawn? What is a good way to monitor damage without using a running loop? Can I pass multiple commands in the "code to run" parameter? For example, a handler for both the vehicle, group and crew? I know these questions are more general code related than specific to NEO_radio, but it seemed like a good a place as any to ask them. Thanks for the advice and especially thank you for the script! Yours, TAW_louderthanu Share this post Link to post Share on other sites
neokika 62 Posted March 15, 2012 Hi NEO, congratulations for your script,Do you have compatibility with ACRE (differente radio names) ? Best Regards Hi, currently it does not support addon radios such as ACRE ones, although, if you want to make it work with ACRE radios the change should be very trivial. line 58 scripts\NEO_radio\init.sqf line 52 scripts\NEO_radio\init_server.sqf _this in _target && _this hasWeapon ""itemGps"" && ( _this hasWeapon ""itemRadio"" || _this hasWeapon ""ACRE_radio_1"" //Put real class names of ACRE radios here || _this hasWeapon ""ACRE_radio_2"" //Put real class names of ACRE radios here ) Hello, very nice script and easy to configure. thanks.I have 2 questions: 1-How to use the laser artillery?. 2-Laser can be used with SAD? .How is it done? Hi there, Arty Laser Strike 1 - Make a artillery unit that uses LASER rounds, like the M119 2 - Select a unit for yourself with a Laser Designator and a couple of batteries 3 - Open radio interface 4 - Select Arty > Select the M119 Battery > Call for a LASER strike somewhere close to you 5 - Use Laser Designator to paint the target and rounds should hit it with high precision CAS Laser Strike 1 - Call a CAS unit near you 2 - Paint targets and CAS unit should start engaging any you have painted To respawn an asset after it is destroyed I've added the following event handler to the "Code To Execute" parameter in the array in "NEO_coreLogic" for each asset. I made the apperaently correct assumption that "Code To Execute" was analogous to the init field: Hi louderthanu, Negative, the code to execute block is just some custom code you can run, although it is not run in any object init commands, it will simply run on the server instead (where the units were created and are local to). Can I pass multiple commands in the "code to run" parameter? For example, a handler for both the vehicle, group and crew? Totally, you can do whatever you want inside the code block, loops, sleeps, execute scripts, etc. Sometimes the vehicle is damaged during an attack at it's base but is not destroyed causing the crew to disembark. Maybe one dies, maybe all die... but they're no longer in the vehicle, rendering the asset "inoperable". Yes, crew will always jump out if vehicle is not operable any more, even if it looks ok from the outside, back rotor might be damaged for example, so they jump out and group becomes out of action. About the problem you are having about the crewless choppers after respawn I can't comment just yet, once I get home I'll test it out and make an example if all is working correctly. Thanks to all for the feedback, _neo_ Share this post Link to post Share on other sites
jsc 1 Posted March 23, 2012 how can i give the unit a name using Code To Execute parameters within neo_corelogic Share this post Link to post Share on other sites
Chibi-Alien 10 Posted March 24, 2012 This is one of the neatest and most functional things i've seen for a while. Nice work and thank you for sharing it. Share this post Link to post Share on other sites
sion 1 Posted March 27, 2012 very very nice script i love it, that is exactly the thing i was searching for, so thx for ur great work! but i didnt got the respawn thing! could u pls tell me what files i have to edit? what do i have to change/ add in which file? do i have to change the init which is placed in the same folder like the mission.sqm or the init placed in the NEO_radio folder? best would be you, if its not to much work for u, to post the code i need, to let respawn a transport heli, and a cas aircraft in case i got shot down ;) it would be really nice of you ;) Share this post Link to post Share on other sites
Chibi-Alien 10 Posted April 1, 2012 I found an interesting bit of information in regards to a possible bug. If a group has a pilot class in it and it is onboard a transport chopper, the player looses the option "talk to pilot" in the action menu. I played with it a little bit and put the pilot in my group off the chopper, and the "talk to pilot" action returned. When i ordered him to get back onboard the action disappeared again. If you have the radio on you, you can still use "call for support" to control the transport chopper. Share this post Link to post Share on other sites
SP33Dkt 10 Posted April 1, 2012 Hey, would it be possible to somehow do so only 1 person can "Talk with Pilot"? I have currently done: RESCUE addAction (NEO_radioLogic getVariable "NEO_radioPlayerActionArray"); So only the unit "RESCUE" Gets the ability to call in the support, BUT, if others enter the choppers, they still get the options to "Talk With Pilot". Anyways to remove this? Share this post Link to post Share on other sites
supergruntsb78 67 Posted April 10, 2012 i switched the arty's to PRACS arty pieces (105mm and the 155mm and the MLRS) but when i try a fire mission the unit is availible but i can not select a fire mission nor can a set a target area etc. (the radio says unit is availible) any idea how i can fix that (ps the units do spawn on the field ) Share this post Link to post Share on other sites
louderthanu 10 Posted April 20, 2012 (edited) Thanks NEO, again.... I got it doing what I wanted to do. The "stock bis" behaviour is still there but I worked around it. My solution was to have a dialog accessable from my "Command Post" that will respawn a partially damaged asset "manually" and find/delete the roaming, extra pilots. I noticed the pilots never roamed far from thier vehicle so finding them was a piece of cake as long as I knew where the chopper / spawn point was. The problem with spawning incomplete crew turns out to be more a function of BIS and the missions' unit count than your script. Most missions this isn't an issue, but on this particular mission overall count can cause great havoc with spawining functions late in the mission.... Thank you so much for the excellent framework! louderthanyou Edited April 20, 2012 by louderthanu Share this post Link to post Share on other sites
kremator 1065 Posted April 21, 2012 Just been playing with this .... WHY have I not found it until now??? Anyway, I would like to integrate this into my mashup mission. There is a problem however, in that everything is spawned on-the-fly and therefore doesn't have any set names. Does anyone know (or indeed NEO) how I could implement these scripts for my mission? Share this post Link to post Share on other sites
Chibi-Alien 10 Posted April 22, 2012 I have a pretty "terrible" work around, but i have a trigger in place of where the vehicle will spawn with this in the on activation line: {whatevername = _x} foreach thislist; then of course set it to PRESENT blufor or opfor. once the mission starts whatever vehicle is in that trigger area will get the name. Terrible way to do it, but i cant figure out how to do from init. Share this post Link to post Share on other sites
kremator 1065 Posted April 22, 2012 (edited) Could it be done by looking for TypeOf "Air", giving it a code (like CIGAR) then assigning a random or consecutive number? So, all attack choppers get called CIGAR and the one that just spawned gets called CIGAR_00123. Of course there would be no need to use the scripts to actually spawn the vehicles on their marker positions (as they already exist) Now THIS would be cool! Edited April 22, 2012 by Kremator Share this post Link to post Share on other sites
neokika 62 Posted April 22, 2012 Anyway, I would like to integrate this into my mashup mission. There is a problem however, in that everything is spawned on-the-fly and therefore doesn't have any set names. Does anyone know (or indeed NEO) how I could implement these scripts for my mission? Hey, It's quite easy using one of the parameters in each unit, the "code" parameter. Lets say you are adding a transport unit: [ getMarkerPos "NEO_mkr_transport_00", //Spawn position 270, //Spawn direction "BAF_Merlin_HC3_D", //Class Name of Helicopter "Eagle-One", //Unit Callsign ["pickup", "land", "land (eng off)", "move", "circle"], //Unit available tasks { MY_chopper = (_this select 0); publicVariable "MY_chopper"; } //Code to execute, you can access in _this variable [_chopper, _grp, _crew] ], So now, MY_chopper variable will contain the chopper object, and will exist in every machine. The line in question is: { MY_chopper = (_this select 0); publicVariable "MY_chopper"; } //Code to execute, you can access in _this variable [_chopper, _grp, _crew] Hope this helps, _neo_ Share this post Link to post Share on other sites
kremator 1065 Posted April 22, 2012 (edited) Ahhhh thats what the {} was for. Cunning :) If you ever played Zonekiller's Battlezone .... that is what I'm trying to put it into :) I suppose the main problem is that there is no markers put on that mission. As the commander I can spawn any vehicle. What I'm looking for is the ability to tag those transport choppers and have them available with Support Radio. Edited April 22, 2012 by Kremator Share this post Link to post Share on other sites