Jump to content

johnofwax

Member
  • Content Count

    7
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About johnofwax

  • Rank
    Rookie
  1. johnofwax

    Support Radio

    Thanks Placid, I didn't realize that, and looking at it now I've facepalmed. On page 5 NEO says limiting support is not possible with the current setup. one would need to play with the scripts a bit... maybe make a counter for player, and when their number of calls are up, remove the action and eventhandler? Now I am in no way an 'arma scripter', I know enough to be dangerous and occasionally crash my game as soon as I hit 'preview'.... However, if I were going to attempt this, I would probably start with how to create a variable that can be accessed from the different scripts. I have no experience with variable scopes, or ones made specifically for multiplayer or anything... so I'm just going to go with vague programming pseudo code / project goal type layout here. Use a variable to hold a counter for each player. I wouldn't be the person to ask what the best way to do this is. Retrieve this variable when the player attempts to make a support call. radio_action.sqf would be a good place to stop them, before the createDialog (Sorry, you cannot call support at this time) You would essentially wrap createDialog inside of an if conditional. if they can make the call, let em. if not, dont. Another option would be to remove the eventhandler / removeaction from the player once the counter is up, and add it later if so desired. Add 1 to the count after the player successfully gives an asset an instruction. functions\ui\cas\fn_casConfirmButton.sqf ? looks like this would be a good place to add a counter. It's executed when the unit calls support. One could theoretically do it ALL in here, and a conditional would exist close to the bottom to either A) have the player call for support as it is now, or B) inform the player they cannot request support at this time. That's just a place to start, and probably how I would start working on that feature. I've only been playing Arma2 for about 2 months now, and with work and kids I haven't had time to do much anyways... so I can't say this is the best method, or if it would even work... but that's what programming / scripting is all about. It can be done. and it can probably be done fairly easily by someone more experienced with the workings of arma scripting... but if I were looking to implement this feature into this script package, that's where I would begin. Edit : I'm going to give it a go. I dunno if it'll work, but its worth a shot... Oh look at that. it worked. I cannot guarantee it works on multiplayer, YMMV. NEO_radio\init.sqf player addAction (NEO_radioLogic getVariable "NEO_radioPlayerActionArray"); player addEventHandler ["Respawn", { (_this select 0) addAction (NEO_radioLogic getVariable "NEO_radioPlayerActionArray") }]; [color="#B22222"] player setVariable ["cascalls", 3];[/color] player createDiarySubject ["About", "About"]; NEO_radio\functions\ui\cas\fn_casConfirmButton.sqf _coord = _pos call BIS_fnc_posToGrid; [color="#B22222"] _casVariable = player getVariable "cascalls"; if (_casVariable > 0) then {[/color] //New Task [color="#B22222"]_casVariable = _casVariable - 1; player setVariable ["cascalls", _casVariable]; [/color] _veh setVariable ["NEO_radioCasNewTask", [_task, _pos, _radius, _flyInHeight], true]; [player, format ["%1, this is %2. We need imediate CAS at position. Over.", _callsign, _callSignPlayer, _coord select 0, _coord select 1], "side"] call NEO_fnc_messageBroadcast; //Interface [lbCurSel 655565] call NEO_fnc_radioRefreshUi; [color="#B22222"]} else { hint "Sorry. you're SOL"; }[/color] Since the UI stays open after each call, I would recommend closing it after pressing confirm. This would allow you to block it from opening again in another script. closeDialog 0; in the success block instead of the call to NEO_fnc_radioRefreshUI then you can make your radio_action look like this: NEO_radio\radio_action.sqf //Action Variable uinamespace setVariable ["NEO_radioCurrentAction", (_this select 3)]; [color="#B22222"]_casVariable = player getVariable "cascalls"; if (_casVariable > 0) then {[/color] //Open Interface createDialog "NEO_resourceRadio"; [color="#B22222"]} else { _sidemsg = text format["%1, support is not available at this time", name player]; format["%1",_sidemsg] call XfHQChat; }[/color] as you can see from the XfHQChat call, I used Domination as a testing bed for this. Create your message as you see fit. In regards to calling support when contact is made... hmm. for this, you may consider removing the addaction and addeventhandler from NEO_radio\init.sqf and instead creating a TRIGGER: detected by Opfor, on activation, add the action (and eventhandler if desired) That should do.
  2. johnofwax

    Support Radio

    Dont initialize them. in init.sqf remove the blocks that you dont need, and keep the ones you do. If you keep all the markers it would be really easy to add/remove other support units later in the mission if you so desired. [ NEO_coreLogic, [ WEST, [ [ getMarkerPos "NEO_mkr_cas_00", 270, "AH64D", "Falcon-One", 0, { Falcon_One = (_this select 0); publicVariable "Falcon_One";} ], [ getMarkerPos "NEO_mkr_cas_01", 270, "AH64D", "Predator-One", 0, { Predator_One = (_this select 0); publicVariable "Predator_One";} ] ] ] ] execVM "scripts\NEO_radio\init.sqf"; should do the trick. Modify as needed.
  3. johnofwax

    Support Radio

    ahh gotcha. At this point, I'm using the same conditions in your if statement but sometimes when a chopper respawns it just keeps doing it over and over. I'll have to play with it a bit more and see what might be causing it. At first I thought it was the possibility of enemies blowing up the chopper where it sits, and the chopper trying to respawn on a wreck, but since it gets deleted in the respawn script that's not the case.
  4. johnofwax

    Support Radio

    I sometimes have issues with mass respawns of the assets as well. What trigger condition are you using to respawn the asset?
  5. johnofwax

    Support Radio

    You sir, are a gentleman and a scholar. Thank you very much. I'm surprised it took this long to get a response, and now I feel silly for not thinking about that. 2 Function modules... Tada! Now it seems the only problem I'm having is that on a modified Domination scenario (by Xeno of course) , Support Radio works fine when I'm hosting from in game. However, if I use a dedicated server it does not. Almost the same as above except the Support Radio action IS present, it's just empty. I then noticed that the assets are not spawned on the markers. I tested creation of an asset using nul = execVM "scripts\NEO_radio\respawn_eagleone.sqf"; hint "Eagle One Respawned"; and it spawned on the marker. However, Support radio still did not have Transport listed, and when I jumped in and used 'Talk to Pilot', the dialog box was still empty. Could this be something I've done during the modifications? All I've really done is change the units and add some assets so I wouldnt think that was the case. I'm just not really understanding why it works just fine in the editor and when hosted from inside the game, but as soon as it hits a dedi it breaks.
  6. johnofwax

    Riouken's Gear Menu - Alpha

    This is awesome, Thanks!
  7. johnofwax

    Support Radio

    Hello, I've used Support Radio in many missions now, and I love it. When I play with my friends, there are generally only 3-4 of us on a map, so support radio allows us to take on larger targets and be transported to the AOs easier. I recently acquired MSO and Patrol Ops to play around with the dynamic missions and whatnot, and for the life of me I havent been able to incorporate Support Radio into either of these missions. I tracked down the RscTitles class and added the lines around that, and I added the block inside init. Obviously I've added the appropriate markers and NEO function as well. The expected result would be the Support Radio action, but I never get that on the units (radio and gps are in the inventory) However, if I jump into one of the support helicopters (The support units DO spawn), I have an option to talk to the pilot, as WELL as a Support Radio option now. However, when I make a selection, the Available Support area is blank. No CAS, No Transport, No Arty. I'm not getting any crashes, any errors, I've checked arma2oa.RPT and its fine. Has anyone else ran into this issue before? Any tips on what I can do to address it?
×