jaynic
-
Content Count
43 -
Joined
-
Last visited
-
Medals
Posts posted by jaynic
-
-
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
-
Hey oOKexOo,
I took a screen shot of the error I get
Here it is on open of the window:
The only mods loaded are the three RHS, and Achilles.
-
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?
-
As with other people who reported it: I get an error when selecting op for reinforcements when using RHS.
-
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)
-
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...
-
Could you please list which RHS vehicles / units are not available in Zeus?
If they are available in Eden, they should also be available in Zeus.
I'll have a look later today - I'm in the office right now, but I will do so once I get home
-
Yeah there is another way that does not need any config replacement.
You can write a "load" display event handler that integrates the missing vehicle classes to the module tree.
The display name is defined with tvSetText and the vehicle class is stored with tvSetData.
The IDD of the curator display is 321 and the IDC of the module tree are 270 (west), 271 (east), 272 (guer).
You can look them up in "Arma 3\Curator\Addons\ui_f_curator.pbo". There is a file called defineResinclDesign.inc in the folder UI.
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.
-
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
-
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..
-
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
-
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 -
Fantastic. Thank you.
-
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
-
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...
-
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
-
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...
-
Found this in the changelog:•Fixed: Multiple analog inputs on one action are averaged instead of summed. Be sure to not set input you are not using for that action as this will lower the overall input.
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?
-
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
-
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.
-
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?!
-
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.
-
Ahh I see. So I can only return arrays of data from a script. And to pull out that data, I have to already know what index the desired parameter exists in?
I get it - I don't agree with it because that means all of my logic has to run regardless of whether or not I need to call it... Or - can I return the function itself as an entry in the array?
Thanks for taking all this time to answer BTW - really appreciate it.
-
Getting close... let me put it this way.... If this was javascript - I would write it like so:
//pseudo-code //UnitExtension - this class is constructed around a unit to add commonly used functions for a particular unit //PARAMETERS: pass in a valid unit function UnitExtension(pUnit) { this.unit = pUnit; this.getName = function(){ return //call some bohemia function to get the units name } this.isPlayer = function(){ return //call some bohemia function to get whether or not this is a player } }
Now I have my utility - next I want to comsume this in some fashion... So in some other script:
//pseudo-code //InitializeUnits - This script will set the units in the mission with some default loadouts - it will not manipulate players loadouts - only AI _myUnit0 = new UnitExtension(someAiUnit); _myUnit1 = new UnitExtension(somePlayerUnit); //Now we determine if we need to adjust the loadouts of the units - ignore players if(!_myUnit0.isPlayer){ //This would evaluate to true - because _myUnit0 is an AI unit; //Call some function to adjust the loadout } if(!_myUnit1.isPlayer) { //This wouldn't run - because the function returned true: he is a player }
Achilles
in ARMA 3 - ADDONS & MODS: COMPLETE
Posted
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.