Jump to content

zephyrdark

Member
  • Content Count

    59
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

1 Follower

About zephyrdark

  • Rank
    Lance Corporal

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. ACE Changed the default IFAK a while back. You no longer carry morphine or epinephrine. Also, there a couple new medical items (tourniquet namely) and some of them have been renamed. (IFAK is now Bandage, Bandage Kit (Elastic), and a tourniquet). A couple other things: Sparebarrel bag has no weight listed Satchels' weight is now increased in-game for ACE. They weight about 9.6kg iirc Just thought I'd point out the changes that have occurred in-game but have not been updated for the tool.
  2. zephyrdark

    Shotfinder Script 2.0

    I'll see what I can do with making a Non-ACE version. I won't guarentee it with the release of the ACE version, but I should be able to make one that will work. It will, however, still require CBA no matter what as a decent amount of the code relies on some of the CBA API.
  3. I am also looking for something along these lines. I'm in the process of making an addon and currently a lot of the function I would like to implement would best be designed with its own custom user interface.
  4. haha! Thank you GNat! So, looking at it, it was the sounds[]= at the top of the class interfering with everything else, that and the inheriting. (It's working now)
  5. I already have a cfgPatches, possibly I'm doing something wrong there or elsewhere in the config. He's the full config.cpp as of right now. class CfgPatches { class tg_shotfinder { units[] = {}; weapons[] = {}; requiredVersion = 1.0; requiredAddons[] = {"CAData", "CBA_MAIN", "ACE_MAIN","ACE_SYS_INTERACTION"}; author[] = {"BlackPython","OPS"}; }; }; class CfgSounds { sounds[] = {SF 1oclock}; class oc1 { name = "SF 1oclock"; sound[] = {"tg_shotfinder\sounds\shot1oclock.ogg", 1, 1}; titles[] = {}; }; }; class CfgVehicleClasses { class tg_shotfinder_vc { displayName = "BoomeRange Objects"; }; }; class CfgVehicles { class HouseBase; class House: HouseBase { class DestructionEffects; class AnimationSources; }; class tg_shotfinder_mast: House { vehicleClass="tg_shotfinder_vc"; icon = "tg_shotfinder\object.paa"; accuracy = 0.200000; scope=2; simulation="House"; camouflage=10; Audible=10; mapSize=0.2; cost=100000000; threat[]={1,1,1}; armor = 1000; irtarget=0; destrType = "DestructYes"; lasertarget=0; side = 3; displayName = "BoomeRange Antenna"; animated = 1; model = "\tg_shotfinder\model\mast.p3d"; }; class sf_tripod : tg_shotfinder_mast { displayName = "BoomeRange Full Assembly"; model = "\tg_shotfinder\model\fullassembly.p3d"; }; class sf_carrycase : tg_shotfinder_mast { displayName = "BoomeRange Transport Case"; model = "\tg_shotfinder\model\case.p3d"; }; }; class Extended_PostInit_EventHandlers { class tg_shotfinderInit { clientInit = "sfnul = [] spawn compile preprocessFileLineNumbers 'tg_shotfinder\SF_clientInit.sqf'"; }; };
  6. No-Joy. Still running into the same issues with cfgSounds not even being registered. Would be great if anybody had any insight on this.
  7. New Version: 1.5.102412 Download Link: https://dl.dropbox.com/u/102400142/Python%20Script%20Pack%20v1.5.102412.zip
  8. Thanks BlackMamb, I'll have a look through my script and see if I can make some simplifications and comment up a bit of the variables. I keep forgetting that the count command has a condition argument to it. ---------- Post added at 09:08 AM ---------- Previous post was at 08:35 AM ---------- I appear to have solved it. //ScoreCard.sqf private ["_numPlayers","_numAlive","_newString","_bonusScoreString","_Q1","_Q2","_Q3","_Q4","_compiled","_aliveRatio"]; _Q1= _this select 0 select 0; //Quartile 1 (0-25% Alive Score) _Q2= _this select 0 select 1; //Quartile 2 (25-50% Alive Score) _Q3= _this select 0 select 2; //Quartile 3 (50-75% Alive Score) _Q4= _this select 0 select 3; //Quartile 4 (75-100% Alive Score) MEC_BP = false; //Mission End Condition Variable. Once true, allows script to finish. _bonusScoreString = "#"; //Base To-Be Compiled String. "#" will be replaced with _newString formatted text via CBA. //_bonusScoreString will result in creating a dynamic function that should return with variable tScore. _numPlayers = 0; _numAlive = 0; _numPlayers = {isPlayer _x} count allUnits; MEC_BP = true; //Debug. Allows for calling of script via trigger for testing purposes. waitUntil {MEC_BP}; _numAlive = {isPlayer _x && alive _x} count allUnits; _aliveRatio = _numAlive/_numPlayers; // Ratio of players alive at end of mission over the total players. switch (true) do { case ( (_aliveRatio) <= 0.25 ): //Quartile 1 { baseScore = _Q1; }; case ( (_aliveRatio > 0.25) && (_aliveRatio <= 0.50) ): //Quartile 2 { baseScore = _Q2; }; case ( (_aliveRatio > 0.50) && (_aliveRatio<= 0.75) ): //Quartile 3 { baseScore = _Q3; }; case ( (_aliveRatio > 0.75) && (_aliveRatio <= 1) ): //Quartile 4 { baseScore = _Q4 }; }; //hint "resolving final score..."; sleep 1; { _newString = format ["if (%1) then {_tScore= _tScore + %2}; #", _x select 0, _x select 1]; _bonusScoreString = [_bonusScoreString, "#", _newString] call CBA_fnc_replace; sleep .1; } forEach (_this select 1); //Loops through second script argument which is an array of arrays. (i.e., [[sec1,10][sec2,10]) where Element 1 is boolean variable and element 2 is a number. _bonusScoreString = ["_tScore = 0; # [-2, {hint str(_tScore)}] call CBA_fnc_globalExecute; _tScore", "#", _bonusScoreString ] call CBA_fnc_replace; _bonusScoreString = [_bonusScoreString, "#", ""] call CBA_fnc_replace; //copyToClipboard _bonusScoreString; _compiled = compile _bonusScoreString; //Compiles Above string producing Bonus Score function dependent on arguments of the string. copyToClipboard format ["%1",_compiled]; bScore = call _compiled; finalScore = baseScore + bScore; // Final Score = Base Score + Bonus Score [ -2, //Execute on Clients & Server { player globalChat "Mission Complete!"; sleep 2; player globalChat format ["Your Score: %1", _this]; sleep 4; endMission "END1"; }, finalScore ] call CBA_fnc_globalExecute; hint "End of Script Test"; [/Code] I moved around the compiled code to the bottom of the script to ensure it is run only at the end of the mission. I also changed the behaviour of the script-string, it no longer creates an array in which it adds up, but just adds onto the value, _tScore, if the conditions are met. I also added in a waitUntil{} to hold off the script to ensure it is accurate, making it required to run at mission start. Thanks for the help BlackMamb! I will probably be releasing this with my script pack later on with a little bit more refined version of this script in it.
  9. Working on a script that allows mission makers to easily set up a point based score system that judges player's performance based on players left alive and if side objectives were completed. It currently uses CBA functions for sake of ease. So far everything appears to work, but when it reaches the final global execute, it doesn't want to do anything. Through attempts of debugging, I also found that the variable bScore becomes useless once I define it via the call on the compiled string. I've attempted to use typeName to determine if its still a valid variable, but nothing has arisen from that. In the Case of: nul = [ [0,0,0,70],[ [sec1,10],[sec2,10],[sec3,10] ] ]execVM "scoreCard.sqf"; [/Code] the copyToClipboard returns: [Code] { _bsArray = []; tScore = 0; if (false) then {_bonusScore0 = 10;} else {_bonusScore0 = 0}; _bsArray = _bsArray + [_bonusScore0]; if (false) then {_bonusScore1 = 10;} else {_bonusScore1 = 0}; _bsArray = _bsArray + [_bonusScore1]; if (false) then {_bonusScore2 = 10;} else {_bonusScore2 = 0}; _bsArray = _bsArray + [_bonusScore2]; {tScore = tScore + _x} forEach _bsArray; tScore } [/Code] Here is the entire code. [Code] //ScoreCard.sqf private ["_numPlayers","_numAlive","_listNum","_newString","_bonusScoreString","_Q1","_Q2","_Q3","_Q4","_compiled"]; _Q1= _this select 0 select 0; _Q2= _this select 0 select 1; _Q3= _this select 0 select 2; _Q4= _this select 0 select 3; tScore = 0; _listNum = -1; _bonusScoreString = "#"; { _listNum = _listNum + 1; _newString = format ["if (%1) then {_bonusScore%2 = %3;} else {_bonusScore%2 = 0}; _bsArray = _bsArray + [_bonusScore%2]; #", _x select 0, _listNum, _x select 1]; _bonusScoreString = [_bonusScoreString, "#", _newString] call CBA_fnc_replace; sleep .1; } forEach (_this select 1); _bonusScoreString = ["_bsArray = []; tScore = 0; # {tScore = tScore + _x} forEach _bsArray; tScore", "#", _bonusScoreString ] call CBA_fnc_replace; _bonusScoreString = [_bonusScoreString, "#", ""] call CBA_fnc_replace; //copyToClipboard _bonusScoreString; _compiled = compile _bonusScoreString; copyToClipboard format ["%1",_compiled]; bScore = call _compiled; hint typeName bScore; //hintC _bonusScoreString; //sleep 1; _numPlayers = 0; _numAlive = 0; { if (isPlayer _x) then { _numPlayers = _numPlayers + 1; }; } forEach allUnits; { if (isPlayer _x && alive _x) then { _numAlive = _numAlive + 1; }; } forEach allUnits; switch (true) do { case ( (_numAlive / _numPlayers) <= 0.25 ): { baseScore = _Q1; }; case ( ((_numAlive / _numPlayers) > 0.25) && ((_numAlive / _numPlayers) <= 0.50) ): { baseScore = _Q2; }; case ( ((_numAlive / _numPlayers) > 0.50) && ((_numAlive / _numPlayers) <= 0.75) ): { baseScore = _Q3; }; case ( ((_numAlive / _numPlayers) > 0.75) && ((_numAlive / _numPlayers) <= 1) ): { baseScore = _Q4 }; }; //hint "resolving final score..."; sleep 1; finalScore = baseScore + bScore; hint str(finalScore); [ -2, { player globalChat "Mission Complete!"; sleep 2; player globalChat format ["Your Score: %1", _this]; sleep 4; endMission "END1"; }, finalScore ] call CBA_fnc_globalExecute; [/Code]
  10. The issue there is then the mission maker is required to add that to their description. Preferably, I would like all the work to be done for the mission maker in the addon. I have seen pbo's with binarized configs that have cfgSounds in them. Issue is, I don't see any difference in what I have done compared to other addon devs.
  11. Currently running into a complete wall of a problem with the config for an addon I am working on. Currently the config contains: class CfgSounds{ sounds[] = {sf_1oclock_s}; class sf_1oclock_s { name = "1oclocks"; sound[] = {"tg_shotfinder\sounds\shot1oclock_2.ogg", 1, 1}; titles[] = {}; }; }; From what I can tell, I have no syntax errors and the class is basically just a template with the changes I needed to make in the strings and the class name. The issue arises when the the sound is called in a mission, it states that the sound does not exist despite the config saying it should. If it helps, the config.bin/cpp also contains a cfgVehicles, cfgVehicleClasses,CfgRadio, and some rscTitle's.
  12. zephyrdark

    Shotfinder Script 2.0

    I've been working on it on and off for now. I'll probably be putting a lot more work into it in the near future. I'm currently waiting on the models at the moment.
  13. zephyrdark

    Shotfinder Script 2.0

    WIP Update: Changes so far: Script is now an addon Ability to attach system to vehicle Ability to detach system from vehicle Attaching/Detaching enables/disables the system on the vehicle. WIP Model added Requires CBA and ACE Notes: Dependency on ACE may be removed in the future (TBD) CBA will be required no matter what.
  14. zephyrdark

    Shotfinder Script 2.0

    The script version will still be around, I'll probably update it one last time with some of the changes; however, I cannot/will not release a script version with the increased functionality and models, etc.
  15. zephyrdark

    Shotfinder Script 2.0

    Some WIP screens from the stationary version for base defense.
×