Jump to content

jaynic

Member
  • Content Count

    43
  • Joined

  • Last visited

  • Medals

Everything posted by jaynic

  1. jaynic

    RHS and Zeus

    Hi all, I've noticed that when I play a zeus mission with RHS - not all of the RHS units, vehicles, groups etc. are available. When I'm building manual scenarios: they are all there: but in zeus there are far fewer. Is there any way to get it all in to zeus? I'm hoping to avoid having to re-write every cfgvehicle definition just to add it to zeus... Is there a simple procedural way to get it in there? A script perhaps to find all the entries, and manually make them available to zeus? Thanks JayNic
  2. Hey all, I've built a script that handles the saving and loading of gear on player death and respawn. I utilize the setUnitLoadout, and getUnitLoadout functions to do this. eg: //init player addEventHandler ["Killed", { ["respawnLoadout\save"] call JNMP_x; }]; //When they respawn - all we need to do is load their loadout player addEventHandler ["Respawn", { ["respawnLoadout\load"] call JNMP_x; }]; //end init //save.sqf //Check that the respawn loadout system is active for the given player if(_respawnWithPriorLoadout) then { profileNamespace setVariable ["JNMP_respawnLoadout", getUnitLoadout player]; }; //end save //load.sqf if(_respawnWithPriorLoadout) then { //Save it to our profile variable _loadout = profileNamespace getVariable ["JNMP_respawnLoadout",nil]; if!(isNil "_loadout") then { if(typeName _loadout == "ARRAY") then { player setUnitLoadout _loadout; }; }; }; //end load But here's the funky problem... When I use the default revive system: the player enters a revive state, and drops his weapon. Therefore if he dies in this state: he respawns without his gun... Any ideas on how I can record his gear prior to him losing his gun? I can't find any event handlers in the system for players entering the incapped state...
  3. Hi all, I'm trying to put a zeus module in my mission without any restrictions... No costs, no limitations on placing things, and the ability to place all units, and all factions off the bat... This doesn't strike me as something that should be this difficult, but I can't find it anywhere. I've attempted to place modules and sync themn with the game master that limited costs to 0 - but I still can't even see anything but the ability to place some infantry... Can't place tanks, bunkers, anything fun..
  4. Hi all, Is it possible to add a global init handler to any object where an init handler is possible? Ideally something like: class BaseObject{ class EventHandlers:EventHandlers{ init="(_this) execVM ""myModpack\fnc\globalInit.sqf"""; } } I'd like to add my own init and not override any current ones. If I have to harcode object types, then I guess it would be all the main gameplay ones: vehicles, men, players Is this even possible?
  5. Hi all, As the title suggests: can I dynamically enable or disable the revive system across the entire mission without the mission having it set up in the first place? I know there are respawnTemplates[] {"Revive"} (or whatever it is) but I don't know about adding those, or removing them at will. In addition, if I do add or remove them: would I need to enable it to work again on all players? Thanks
  6. jaynic

    Achilles

    You're welcome! If you need more - like a log file or something - I can probably figure out where that is Also, RHS JUST updated recently. I made sure to run the update before I caught this screenshot - so I know it's all up to date.
  7. jaynic

    Achilles

    Hey oOKexOo, I took a screen shot of the error I get Here it is on open of the window: http://images.akamai.steamusercontent.com/ugc/270597859068517603/51A7EC2E95FDD74B7D3EB57DB314DEDBF773DB96/ The only mods loaded are the three RHS, and Achilles.
  8. jaynic

    Achilles

    As with other people who reported it: I get an error when selecting op for reinforcements when using RHS.
  9. jaynic

    RHS and Zeus

    Ok all - this is embarrassing... But I must have been mistaken. All RHS elements seem to be there, although I swear they weren't. I may have had some mod mucking about with it... Regardless: the information provided by oOKexOo is excellent for adding custom code injected in to the zeus interface, and people should know about it. I'll be using this myself. It's interesting to see in there that there are methods that are removing content from the tree views. This is great for those who are playing with total conversions: and don't want to see the default Arma content - like me. (I don't like the future angles)
  10. jaynic

    RHS and Zeus

    I'll have a look later today - I'm in the office right now, but I will do so once I get home
  11. jaynic

    RHS and Zeus

    Hmm ok. So I add an event handler to the curator display to look for the various sidebars that you mentioned. Then I need to loop through all the elements in the RHS config file (this part is new to me: I don't know how to do that) and basically find some way to check if the unit is already there, and if not: add it. I can probably piece this together somehow, thanks.
  12. I ended up posting in Armaholic too http://www.armaholic.com/forums.php?m=posts&q=32955 User 654wak654 was able to demonstrate the structure. I got it working. Super happy. Except now I'm not going to touch it for a long time until my group is all done with Fallout 4 :P Thanks
  13. Hi all, I am tring to create a basic addon that decreases the amount of fatigue by a variable. I have made it in individual missions, but I'd like to make it an addon so I can have it accessible all the time with my group... I have looked for a guide on how to get this started, but haven't come up with anything. Everything I see is about creating some magical 'p' drive and all this... It seems like it's overly complex for what I'm attempting - I should just be able to script this, correct? Anyways, I have the following script: if !(hasInterface) exitWith{}; waitUntil {!isNull(findDisplay 46)}; waitUntil {!isNull player}; //set global variables missionNamespace setVariable ["OHTC_FatigueMultiplier", 0.3]; _l = 0; //The last fatigue we had while {true} do { if(!(isNil "OHTC_FatigueMultiplier") && typeName OHTC_FatigueMultiplier == "SCALAR" && OHTC_FatigueMultiplier >0 0 OHTC_FatigueMultiplier <= 1) then { //The current fatigue of the player _c = getfatigue player; //The default increase: ie: difference between what we have now, and what we had last time we ran _di = _c - _l; //The NEW increase in fatigue would be the percentage we request of the default increase _ni = _di - (_di * OHTC_FatigueMultiplier); //Assuming we've gone up: let's set the fatigue to the new value; if(_ni > 0) then { player setFatigue _c - _ni; }; systemChat format ["Last: %1, Current: %2, Default Inc: %3, Multiplier: %4, New Inc: %5, Final Fatigue: %6", _l, _c, _di, OHTC_FatigueMultiplier, _ni, getfatigue player]; //Now we set our last historical value to our modified value _l = getfatigue player; }; sleep 1; } And I want it as a mod. I've taken apart a couple mods with Elitness, but I'm not understanding how to piece one together myself. I have folder in my arma directory called "@OHTCfatigueMultiplier". Inside this folder I have another folder called "addons" Inside the addons folder I have a script - init.sqf - that contains the above script. What else am I missing, please? Thank you
  14. Hi all, I currently use MCC, and zeus, and some content mods (RHS Escalation etc...) What I'd like to do is write custom loadouts for all units and vehicles - but it would not be good practice for me to manually edit the mods - as that will require the same effort when the mod updates. Rather: I need to write a wrapper class around the spawning of units both in the init line of any manually placed unit in the mission file (this process I understand) but have the ability to call the same functions when the units are spawned via zeus, or mcc. I'm hoping there is an event handler for when ANY unit or vehicle or object is spawned in the game that I can attach a script call to via my mission. pseudo code: addEventHandler ["onObjectSpawn", [_theObject], "pathTo/myScript.sqf"] I'm pretty new to arma scripting - but I can kinda tell what needs to get done - but I don't know the syntax or where to find out what to do. Thanks
  15. Hey guys, I'm trying to get in to arma 3 scripting. I'm a professional developer with 6 years experience in object oriented languages, and I'm finding the syntax of sqf to be special. And I mean "short-bus" special. Regardless - it's what we're given to work with. I'm able to wade my way through the muck of various procedural calls and what not - but I'm hitting a wall when I get to generating some in game menus and uis. Can anyone point out a decent tutorial for those, please? Specifically: I'm wanting to develop a screen that pops up, and permits user interaction with a map - not the default in game map - but one I generate that will display some specific configuration based data. I tried tearing apart MCC and reverse engineering it - but it's a bit hard to follow. Any help would be great. Thanks
  16. Hey guys, I've got the following script: //FATIGUE MULTIPLIER //JayNic 2015-04-12 //This script is used to change the rate at which fatigue applies to the player. //The changes will only impact the INCREASE in fatigue: meaning that it will NOT // change the rate at which players RECOVER from fatigue. //It is designed to be run on the client - so each time a player OHTC_AdjustFatigue = { player enableFatigue true; _l = 0; //The last fatigue we had while {true} do { if(!(isNil "OHTC_FatigueMultiplier") && typeName OHTC_FatigueMultiplier == "SCALAR" && OHTC_FatigueMultiplier > 0 && OHTC_FatigueMultiplier <= 1) then { //The current fatigue of the player _c = getfatigue player; //The default increase: ie: difference between what we have now, and what we had last time we ran _di = _c - _l; //The NEW increase in fatigue would be the percentage we request of the default increase _ni = _di - (_di * OHTC_FatigueMultiplier); //Assuming we've gone up: let's set the fatigue to the new value; if(_ni > 0) then { player setFatigue _c - _ni; }; systemChat format ["Last: %1, Current: %2, Default Inc: %3, Multiplier: %4, New Inc: %5, Final Fatigue: %6", _l, _c, _di, OHTC_FatigueMultiplier, _ni, getfatigue player]; //Now we set our last historical value to our modified value _l = getfatigue player; }; sleep 1; } }; player addEventHandler ["Respawn",{ _null = [] call OHTC_AdjustFatigue; }]; _null = [] call OHTC_AdjustFatigue; It works fine - but after respawn: the game hangs for a second and then I get the "generic error in expression" error @ line 33. Line 33 being: sleep 1; I'm sure it's some wierd syntax thing I'm doing. Any help would be great. Thanks
  17. Thanks dude. Works like a charm. I just read the documentation on functions in the wiki and followed the sample code. Looks like I need to read some more. Don't quite see the difference between the two - or why there should be a difference...
  18. Hey all, I came home to play some arma today and noticed that my xbox 360 controller, and my saitek pedals no longer turn the rudder as fast as the keyboard... I've basically been handicapped. I have tired mucking about with the sensitivities of stuff, but nothing seems to change... I'm quite peeved... Anyone else confirm that the keyboard will turn your rudder faster than your input devices? ---------- Post added at 20:51 ---------- Previous post was at 19:16 ---------- This has been reported by another user - and apparently it was reported twice before that where it was marked as fixed: http://feedback.arma3.com/view.php?id=21926 Please vote it up. thank you
  19. Hey guys, Thanks to Ratszo's post - I tested out unbinding one of my controllers at a time. That is: I ensured I only have ONE non-keyboard/mouse device bound to my rudder. This seems to have resolved the issue. When I have the XBOX 360 controller - right stick bound to rudder and my saitek pedals bound to rudder - my rudder rotation is cut (I assume) in half. When I unbound one device, and tried the other - I got my full rotation back... So this will work for now - but I prefer to have my fall-backs available - and I see no game logical reason that would require this sort of change from BIS. If the reason was to fix an issue where using two input devices would result in double turn speed: then the solution is not to average each device... It is to enforce a maximum turn radius on game objects that need one...
  20. Thanks for answering - what does this mean? I know there is a rudder left analogue, and a rudder right analogue - but I'm not using them - just the normal ones... does this still apply? What should I change? Basically bind one method of input to the control?
  21. jaynic

    Need 5 voices

    Hey dude, sorry for the delay - life stuff n all.... Anyways, I've shared them via drive here: https://drive.google.com/folderview?id=0B7MHQTfQlrwGMFZLLXdOMTFQTlk&usp=sharing I assume the ones crossed off are not needed? I hope so cause I only did the remainder. Two takes each. Happy scripting.
  22. Hey all - I have the following script: /*OHTC OBJECT FUNCTION * This function is designed to be a single global function to call the methods from a "model" in a more object oriented approach * * PARAMETERS: * 0 : array : "objectPath" the file path to find the desired function. Each entry should be a string of a folder, and the * final one should be the method name. The final must NOT include the .sqf file extension * 1 : array : "parameters" the array of parameters to pass to the desired class/script - these will be passed as is without manipulation. * NOTE that a null value will be replaced with a new and empty array * An example call of this function: * [["ohtc","unit","new"],[_unit]] call ohtc_fnc_obj; * The above would call the execVm of the file at: ohtc/unit/new.sqf */ //Define our variabless private ["_parameters","_objectPath","_result","_mypath"]; _objectPath = []; if(typeName (_this select 0) == "ARRAY") then { _objectPath = _this select 0; }; _parameters = []; if(typeName (_this select 1) == "ARRAY") then { _parameters = _this select 1; }; _mypath = ""; _result = ""; diag_log format ["obj: entered with: parameters: %1, and objectPath: %2",_parameters,_objectPath]; diag_log format ["obj: parameters type: %1, and objectPath type: %2",typeName _parameters,typeName _objectPath]; diag_log format ["obj: objectPath[0]: %1",_objectPath select 0]; //If the user has passed null parameters - we replace that with a new array //Now the logic try { diag_log format ["obj: in try block: objectPath[0]: %1",_objectPath select 0]; //Validate that the user has passed us an object path, and that if it is there - its not null /* if((count _objectPath) == 0) then { //Throw the 101 error code diag_log "obj: objectPath is not an array or is empty"; throw "100"; }; */ diag_log format ["obj: _mypath type: %1",typeName _mypath]; //Now attempt to concatenate the string and call the exec vm requested //loop through the array of folders and construct the path _mypath = _objectPath select 0; diag_log "obj: initial path is: " + _mypath; for "_x" from 1 to (count _objectPath) do { _mypath = _mypath + "\" + (_objectPath select _x); }; _mypath = _mypath + ".sqf"; diag_log "obj: path constructed as: " + _mypath; _result = _parameters execVM _mypath; } catch { diag_log "obj: WARNIng caught an exception: " + _exception; /* case "100": { _nul = [["ohtc","exception","new"],["OHTC_OBJECT_FUNCTION_100", "The objectPath must not be null, or empty"]] call ohtc_fnc_obj; }; default { //Wups - we caught an unhandled exception! _nul = [["ohtc","exception","new"],["OHTC_OBJECT_FUNCTION_UNKNOWN", "An unknown exception was caught"]] call ohtc_fnc_obj; }; */ }; _result When I run it - my log shows as follows: 21:31:28 No owner 21:31:42 Cannot load sound 'a3\ui_f\data\sound\onclick.wss' 21:31:42 "obj: entered with: parameters: ["here is what i passed"], and objectPath: ["ohtc","testFunction"]" 21:31:42 "obj: parameters type: ARRAY, and objectPath type: ARRAY" 21:31:42 "obj: objectPath[0]: ohtc" 21:31:42 "obj: in try block: objectPath[0]: ohtc" 21:31:42 "obj: _mypath type: STRING" 21:31:42 "obj: initial path is: " 21:31:42 "obj: path constructed as: " 21:31:42 Error in expression <+ (_objectPath select _x); }; _mypath = _mypath + ".sqf"; diag_log "obj: path co> 21:31:42 Error position: <_mypath + ".sqf"; diag_log "obj: path co> 21:31:42 Error Undefined variable in expression: _mypath 21:31:42 File mpmissions\OHTC_FPOC_Blank_Mission.Altis\ohtc\fn_obj.sqf, line 53 21:31:42 Error in expression < exception: " + _exception; }; _result> 21:31:42 Error position: <_result> 21:31:42 Error Undefined variable in expression: _result 21:31:42 File mpmissions\OHTC_FPOC_Blank_Mission.Altis\ohtc\fn_obj.sqf, line 68 Why the heck is _mypath undefined?!
  23. jaynic

    Need 5 voices

    Hey I'm a voice actor - I'd love to help! I dunno anything about making ogg files - but assuming I find a decent recorder program - it may be able to output it (?). I hope this isn't a dealbreaker. Can you tell me more about the context of each of the lines? For example - are we under fire while speaking, or is this a casual speech. Are we in a vehicle that has a running engine? Do I need to speak as if I am competing with the engine noise? Any additional context data will really help. I can get to recording these in the next couple days.
  24. Hi all, I'm attempting to re-structure and organize my code - but I am having problems registering my external functions inside the missions description.ext > CfgFunctions class. I have the following inside the description.ext: class ohtc { tag = "ohtc"; class testCategory { file = "ohtc\f\testCategory"; class testFunction { description = "This is a test function that returns a silly string"; }; }; }; I then create the corresponding folder inside the mission root (right next to the description.ext): ohtc/f/testCategory Inside there - I have a file called: "fn_testFunction.sqf" The contents of that file are as follows: //Return the string with a prependix; private ["_a"]; _b = _this select 0; _a = 'passed in: '; _a + _b; When I go in game, and enter the following in to the debugger: hint format ['called my function: %1' , (['asdasd'] call ohtc_fnc_testFunction)]; all I get is a hint that says "called my function: any" I feel like this is a silly syntax error oversite on my part.. can anyone please assist?
×