Jump to content

fett_li

Member
  • Content Count

    76
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by fett_li

  1. I didn't experience any of this behaviour. But I will test it as soon as I can and bear it in mind. Thanks for the hint.
  2. I think, this functions don't work on local hosted games :) Test it again on dedicated :)
  3. I got this error quite a few times during testing in ArmA: Error in expression <uments call _code; } else { _arguments call (call compile _code); }; } forEach > Error position: <call (call compile _code); }; } forEach > Error call: Type Script, expected code File A3\Functions_F_EPA\Misc\fn_executeStackedEventHandler.sqf, line 41 Error in expression <uments call _code; } else { _arguments call (call compile _code); }; } forEach > Error position: <call (call compile _code); }; } forEach > Error generic error in expression File A3\Functions_F_EPA\Misc\fn_executeStackedEventHandler.sqf, line 41 Could it be possible, that the probleme is, that in line 41 there is two times a call? See ll29-43: //Process data { //Data item parameters private ["_code", "_arguments"]; _code = [_x, 2, "", [{}, ""]] call BIS_fnc_param; _arguments = [_x, 3, []] call BIS_fnc_param; if (typeName _code != typeName "") then { //Execute code _arguments call _code; } else { //Execute function _arguments call (call compile _code); }; } forEach _data; I don't want to open up a new feedback ticket, unless I can be sure, that this is an error.
  4. Do you use this scripts on a local hosted multiplayer game?
  5. I don't call it. It get's called by BIS_functions.
  6. Hey guys! I just wrote a new script which allows you to save the cool base and camp templates which are only available as zeus. I mean the constructions predefined in the groups menu of zeus such as "Camp Audacity". The usage of this script is quite simple: _this select 0 will be the object which ist the center of the template, the direction will take effect. _this select 1 will be the name of the template you want to spawn as a string. You can just look it up in the zeus menu and use the display names there or just look into my script. The return value will be parsed text which you can throw out via debug console and then copy and paste into you're mission.sqm. You have to replace the whole class Vehicles { ... }; entry in any mission.sqm so I suggest to you to create a new and empty mission and save it there to merge it later. This will be much safer. And here is the script, enjoy it: private ["_center","_centerDir","_outpost","_bases","_bases_classes","_roadBlocks","_roadBlocks_classes","_camps","_camps_classes","_checkPoints","_checkPoints_classes","_side","_type","_class","_exit"]; // possible values for outpost can be found in the array _bases, _raodblocks, _camps abd _checkpoints _center = [_this,0,objNull,[objNull]] call BIS_fnc_param; if (isNull _center) exitWith {}; _centerDir = getDir _center; _outpost = [_this,1,"",[""]] call BIS_fnc_param; _outpost = toUpper _outpost; _bases = ["CAMP AUDACITY","CAMP BRAVERY","CAMP COURAGE","CAMP DEFIANCE","CAMP ENDURANCE","CAMP FORTITUDE"]; _bases_classes = ["OutpostA","OutpostB","OutpostC","OutpostD","OutpostE","OutpostF"]; _roadBlocks = ["HASTY ROADBLOCK","ROADBLOCK"]; _roadBlocks_classes = ["RoadBlock1","RoadBlock2"]; _camps = ["CAMP ANT","CAMP BEAR","CAMP CROW","CAMP DEER","CAMP EAGLE","CAMP FALCON"]; _camps_classes = ["CampA","CampB","CampC","CampD","CampE","CampF"]; _checkPoints = ["CHECK POINT (LARGE)","CHECK POINT (MEDIUM)","CHECK POINT (SMALL)"]; _checkPoints_classes = ["CheckPointLarge","CheckPointMedium","CheckPointSmall"]; _side = ""; _type = ""; _class = ""; _exit = false; switch true do { case (_outpost in _bases) : { _side = "Military"; _type = "Outposts"; _class = _bases_classes select (_bases find _outpost); }; case (_outpost in _roadBlocks) : { _side = "Military"; _type = "RoadBlocks"; _class = _roadBlocks_classes select (_roadBlocks find _outpost); }; case (_outpost in _camps) : { _side = "Guerrilla"; _type = "Camps"; _class = _camps_classes select (_camps find _outpost); }; case (_outpost in _checkPoints) : { _side = "Civilian"; _type = "Checkpoints"; _class = _checkPoints_classes select (_checkPoints find _outpost); }; default { _exit = true; }; }; if _exit exitWith {}; _objects = (configfile >> "CfgGroups" >> "Empty" >> _side >> _type >> _class) call bis_fnc_getcfgsubclasses; _objects_strings = []; { private ["_pos","_dir","_veh","_obj"]; _pos = getArray (configfile >> "CfgGroups" >> "Empty" >> _side >> _type >> _class >> _x >> "position"); _pos = _center modelToWorld _pos; _pos = ATLtoASL _pos; _dir = getNumber (configfile >> "CfgGroups" >> "Empty" >> _side >> _type >> _class >> _x >> "dir"); _dir = _dir + _centerDir; _veh = getText (configfile >> "CfgGroups" >> "Empty" >> _side >> _type >> _class >> _x >> "vehicle"); _objects_strings set [_forEachIndex,format [ "class Item%1 { position[]={%2,%3,%4}; azimut=%5; id=0; side=""EMPTY""; vehicle=""%6""; leader=1; skill=0; }; ",_forEachIndex,_pos select 0,_pos select 2,_pos select 1,_dir,_veh]]; } forEach _objects; _start = format ["class Vehicles { items=%1;",count _objects]; _mid = ""; _end = " };"; { _mid = _mid + _x; } forEach _objects_strings; _result = _start + _mid + _end; parseText _result
  7. The problem is this part of your code: class CfgFunctions { class FETT { class curator { class eventHandlers {postInit = 1;}; class objPlaced {}; class grpPlaced {}; }; }; { #include "VAS\cfgfunctions.hpp" #include "ais_injury\cfgFunctionsAIS.hpp" }; There are more brackets open then closed. The correct code would be: class CfgFunctions { class FETT { class curator { class eventHandlers {postInit = 1;}; class objPlaced {}; class grpPlaced {}; }; }; #include "VAS\cfgfunctions.hpp" #include "ais_injury\cfgFunctionsAIS.hpp" }; Maybe you see the error now when you compare both options :) To you're other question: The initPlayerLocal.sqf is a new event script introduced in ArmA 3. You can create it just like the init.sqf. It is run only when a player joins the server or when the mission is started first (but then of course this script is executed for every player). It is special because the code will be executed local on every clients machine. You can get get further information here: https://community.bistudio.com/wiki/Event_Scripts
  8. Actually I dind't try anything to fix this because it's BIS data and I don't know when it's executed so testing this is kind of hard... I mean it could be that this script will only get code which has another code as return value, only then it would make sense. But I'm getting the script error. I'll just open up a new ticket, maybe BIS can tell me more. http://feedback.arma3.com/view.php?id=19062 Every vote is appreciated :)
  9. This is a problem of locality. As you can see, in my eventhandlers I called first BIS_fnc_MP an within that my own function. EventHandlers are only executed local on the client where they've been fired. As exmaple, the command hint is not executed global, meaning that using hint in this event handlers would just pop up a hint box in the interface of zeus who triggered the event handler. addCuratorEditableObjects also seems not to be global, allthough I'd would make sense if it did ;) If you use BIS_fnc_MP or CBA_fnc_globalExecute the code is executed global and therefore... works :)
  10. I was interested in a way to get detailed information about the specific ammount of "room" vests, rucks and uniform have. So I searched. And found! idk whether someones interested in but I guess some will be :) So here is my scripts which returns the "room" value for ruck, vest or uniform: /* Author: [W] Fett_Li Description: This script returns the space a vest/uniform/backpack has. Parameter(s): _this select 0: STRING - objectname of the vest/uniform/backpack Returns: NUMBER - space of the vest/uniform/backpack */ _item = _this select 0; _cargo = 0; _array = []; if (isClass (configFile >> "CfgVehicles" >> _item)) then { _cargo = getNumber (configFile >> "cfgVehicles" >> _item >> "maximumLoad"); } else { _array = toArray getText (configFile >> "CfgWeapons" >> _item >> "iteminfo" >> "containerClass"); for "_i" from 6 to (count _array -1) do { _cargo=_cargo+10^(count _array - 1 - _i)*((_array select _i)-48) }; }; _cargo And now you need - of course - a script which returns the "room" an item takes. So here it is: /* Author: Fett_Li Description: This script returns the "room" an item/weapon takes. Parameter(s): _this select 0: STRING - item Returns: NUMBER - mass of the item */ _item = _this select 0; _mass = 0; if (isClass (configfile >> "CfgWeapons" >> _item)) then { if (isClass (configfile >> "CfgWeapons" >> _item >> "weaponSlotsInfo")) then { _mass = getNumber (configfile >> "CfgWeapons" >> _item >> "weaponSlotsInfo" >> "mass"); } else { _mass = getNumber (configfile >> "CfgWeapons" >> _item >> "itemInfo" >> "mass") }; } else { if (isClass (configfile >> "CfgMagazines" >> _item)) then { _mass = getNumber (configfile >> "CfgMagazines" >> _item >> "mass"); } else { _mass = getNumber (configfile >> "CfgVehicles" >> _item >> "mass"); }; }; _mass Have fun with theese scripts :) Maybe some talented modder for ArmA 3 could show me how to implement a mod showing how much room an items takes via mouseover or something like that. As we know it from ACE in ArmA 2... I think that would be very cool...
  11. getText would throw out something like "Supply100". But I just want the 100 and the script throws out the number after "supply". With this you can use this script better in other scripts because a - of course - understands, what is meant with "Supply100", but a script or computer can handle a number more easily.
  12. I updated my functions!
  13. I think you'd have to look up which variable makes players uneditable via zeus. When I have time the next days I'll look it up in the .pbo's, but you can do this, too :)
  14. Hi mates, me and my clan are using the TAW_VD view distance script for changing the clients view distance on a dedicated server. But as I was playing King of Hill public I noticed that I was able to change my view distance with my normal video options. I then checked the King of Hill's .pbo for any scripts or logics or description.ext entries, allowing to do this, but I didn't found any. So here's my question: How did they enable this? It seems to be an entry in the server config. If any of you knows how to enable this, I'd be very glad. Regards Fett_Li
  15. fett_li

    View distance options

    But as I tested it on our dedicated, there were no changes in view distance, as I set the view distance higher than the default option. There were only changes as I set it lower than default. Do you know any reasons for that?
  16. fett_li

    View distance options

    Yeah, I know that command. But this command won't apply the view distance every specific player set in the video options. Or does "to reset the view distance" mean, that the video settings view distance will be applied?
  17. Hi community, in ArmA 3 I have - as mission editor - a bit of a problem with ending my missions properly. For we in my community play missions normaly without any triggers which indicate wether a task has been completed, etc. There are also no triggers, which could indicate that you have won. It is all in the consideration of the leader whether he declares the mission as won or failed. I could only assume to place a trigger which is activated via radio, but I'd like to have something which is only able for the leader or admin. Because if you just end youre mission by typing "#missions" in chat as admin you don't have the ability to see which player had how much kills. Thanks for helping, best regards [W] Fett_Li
  18. The respawn in this weird fashion because - I assume - you didn't place a marker named "respawn_west", "respawn_east" or "respawn_guer" allthough you activated respawn in the description.ext. Try to add in the description.ext respawn = 3; And place a proper respawn marker in the editor or as zeus.
  19. I found a way to gather the mass of rifles, too. But it works only for ArmA 3 vanilla weapons. There were no correct return values for modded weapons... The first script is updated.
  20. fett_li

    UPSMON Updated to ArmaIII

    Just a little Error: in UPSMON_MAINLOOP.sqf line 1148 [_attackPos,"ColorRed"] call fnc_createMarker; Should be replaced by If (UPSMON_DEBUG > 0) then {[_attackPos,"ColorRed"] call fnc_createMarker;}; Another little Error: in UPSMON_RESPAWN.sqf lines 28-40: If (_reinforcement == "REINFORCEMENT") then { switch (_side) do { case West: { if (_npc in UPSMON_REINFORCEMENT_WEST_UNITS) then {UPSMON_REINFORCEMENT_WEST_UNITS = UPSMON_REINFORCEMENT_WEST_UNITS - [_npc];}; }; case EAST: { if (_npc in "UPSMON_REINFORCEMENT_EAST_UNITS") then {UPSMON_REINFORCEMENT_EAST_UNITS = UPSMON_REINFORCEMENT_EAST_UNITS - [_npc];}; }; case resistance: { if (_npc in "UPSMON_REINFORCEMENT_GUER_UNITS") then {UPSMON_REINFORCEMENT_GUER_UNITS = UPSMON_REINFORCEMENT_GUER_UNITS - [_npc];}; }; The " are wrong. Error: Type String, Expected Array.
  21. fett_li

    UPSMON Updated to ArmaIII

    @blazenchamber: Just look at my last post.
  22. fett_li

    UPSMON Updated to ArmaIII

    @Mattnum: This "RFID x" was something I found, too. It's due to a testing line Azroul probably added. I think it's upsmon_mailoop.sqf where something like: player globalChat format ["%1",_rfid]; Is writren. In my opinion, yiu can just delete this line (I did).
  23. fett_li

    UPSMON Updated to ArmaIII

    UPSMON_supstatestatus is broken. This function only gets called when tpwcas is running. But in "scripts\UPSMON\COMMON\UPSMON_Aze_fnc.sqf" line 31 the function checks for: _tpwcas_running = if (isNil "tpwcas_running") then {true} else {false}; But of course tpwcas_running is true so the script will just return 0 everytime. This line has just to be replaced by: _tpwcas_running = if (tpwcas_running) then {true} else {false}; EDIT: Without this correction units need very long to call for reinforcement. After my correction it gets very fast. EDIT II: Another error :p A unit calling for reinforcement allways called for itself as it could be seen in the rpt. This was just due to the case that the calling unit looked for the unit in the UPSMON_REINFORCEMENT_XXXX_UNITS array who was nearest to the calling unit. Badly enough was the calling unit of course most near to itself. So it allways called itself for reinforcement. My improvements: UPSMON_Askrenf = { player globalchat "reinf"; private ["_npc","_target","_radiorange","_renf","_fixedtargetpos","_side","_dir1","_dir2","_renfgroup","_KRON_Renf","_ArrayGrpRenf"]; _npcpos = _this select 0; _targetpos = _this select 1; _radiorange = _this select 2; _side = _this select 3; _Enemies = _this select 4; _npc = _this select 7; //this is new _fixedtargetpos = [0,0]; _renf = false; _renfgroup = ObjNull; _UPSMON_Renf = []; switch (_side) do { case West: { _UPSMON_Renf = UPSMON_REINFORCEMENT_WEST_UNITS - [_npc]; //org:_UPSMON_Renf = UPSMON_REINFORCEMENT_WEST_UNITS; }; case EAST: { _UPSMON_Renf = UPSMON_REINFORCEMENT_EAST_UNITS - [_npc]; //org: _UPSMON_Renf = UPSMON_REINFORCEMENT_EAST_UNITS; }; case resistance: { _UPSMON_Renf = UPSMON_REINFORCEMENT_GUER_UNITS - [_npc]; //org: _UPSMON_Renf = UPSMON_REINFORCEMENT_GUER_UNITS; }; }; Of course the call for reinforcements has now to be like this: _reinforcementsent = [getpos _npc,_attackpos,_radiorange,_side,_Enemies,_nbrTargets,_enemytanknear,_npc] spawn UPSMON_Askrenf; //org:_reinforcementsent = [getpos _npc,_attackpos,_radiorange,_side,_Enemies,_nbrTargets,_enemytanknear] spawn UPSMON_Askrenf; (found in scripts\UPSMON\UPSMON_MAINLOOP.sqf; line 653
  24. fett_li

    UPSMON Updated to ArmaIII

    I don't know, whether this is correct here, but I found an error. In the init_upsmon.sqf you have the abillity to turn R_WHO_IS_CIV_KILLER_INFO on or off but in the UPSMON_SN_EHKILLEDCIV script (in upsmon_r_fnc.sqf starting at line 254) the script checks whether UPSMON_WHO_IS_CIV_KILLER_INFO is > 0. Just mentioning :) BTW: Nice port! And to add: Line 287 in upsmon_r_fnc.sqf (I mean "[uPSMON_Logic_civkill, nil, rglobalChat, format...") was not working. I replaced it with: call compile format ["[{UPSMON_Logic_civkill globalChat ""A CIVILIAN WAS KILLED BY %1"";},""BIS_fnc_spawn""] call BIS_fnc_MP;",name _killer];
×