Jump to content

dreadedentity

Member
  • Content Count

    1224
  • Joined

  • Last visited

  • Medals

Everything posted by dreadedentity

  1. dreadedentity

    Random delete script

    You were drastically overcomplicating it. Is the group thing necessary? delete_some_units = { { if ((random 100) > 33) then //right now 67% chance to be deleted. change > to < for 33% chance to be deleted { deleteVehicle _x; }; }forEach _this; }; [unit1,unit2,unit3,unit4,unit5, /* etc */] call delete_some_units;
  2. dreadedentity

    Mulitplayer credits

    Those commands aren't really helpful, I should know, I just finished adding all of the examples to this page. I went through them just a little while ago. The only one that could possible be helpful would be something like BIS_fnc_GUImessage and I did manage to do something pretty cool with it. Example: (tested with test arrays, needs someone to run it in MP, but it should work out just fine) _allPlayers = "composeText ["; { if (isPlayer _x) then { _allPlayers = format ["%1'%2'", _allPlayers, name _x]; if (_forEachIndex < ((count playableUnits) - 1)) then { _allPlayers = format ["%1,linebreak,", _allPlayers]; }; }; }forEach playableUnits; _allPlayers = format ["%1];", _allPlayers]; _structuredText = call compile _allPlayers; [_structuredText, "Mission Credits", "THANK YOU", "THANK YOU", findDisplay 46, false, true] spawn BIS_fnc_GUImessage;
  3. I know JSRS and Blastcore are both client-side mods, Shacktac HUD and VTS Resting also appear to be client-side mods. If the case is that they are all client-side mods, no, they will not lag your server because it is impossible. However, they can still cause low FPS for the players that have the mods installed (which is what you experienced), and they can also conflict with scripts you have written. Also, try to be a little more specific with your terminology, "lag" to me means "bad connection" not "low FPS", "low FPS" means "low FPS" to me. True, they can sometimes be related in arma, however, "lag" and "low FPS" have considerably different meanings
  4. "this" only works in the init lines of objects, you need to pass that data to the script in order for it to work and use "_this" inside the script if (isServer) then { /*this execVM "sdocs.sqf"*/ }; if (isServer) then { /*_this*/ setVariable ["RscAttributeDiaryRecord_texture","a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa", true]; [/*_this*/,"RscAttributeDiaryRecord",["Top Secret Docs","These Docs outline the enemies defenses",""]] call bis_fnc_setServerVariable; /*_this*/ setVariable ["recipients", west, true]; ["Task2","Extraction","Get to teh choppa!"] call SHK_Taskmaster_add; ["Task1","succeeded","Task2"] call SHK_Taskmaster_upd; }; I made the parts I edited into comments (so you can easily see what I've done), just make sure you remove the comment markers ( /* */ ) before running the code, or else you'll get a shitload of errors (probably)
  5. This is very awesome, great work. One of the few scripts that I actually want to download and look inside to see how you did things
  6. dreadedentity

    Mulitplayer credits

    would be a lot faster
  7. I made a mistake copyToClipboard _this; //SHOULD BE copyToClipboard str _this; Also, I didn't know you were using the comm menu, that would have been nice to know. I've never used it before. But from the wiki page: caller: Object - unit which called the item, usually player pos: Array in format Position - cursor position target: Object - cursor target is3D: Boolean - true when in 3D scene, false when in map ID: String - item ID as returned by BIS_fnc_addCommMenuItem function My assumption is that you weren't pointing at the ground when you called for the support. This might be proved after you post the clipboard, which should show everything that the script knows about. If not, I guess I'll need to have a play with this myself and figure it out
  8. The reason you have an "Error Zero Divisor" error is because you're trying to select an element that doesn't exist. I think I may be able to help you but I need a little more information: Player calls for ATV. //Okay, granted. Player is known as _this in the first script. (menu.sqf) //can you show me how menu.sqf is being called? Menu.sqf opens a second script comm.sqf //I assume you have some code that selects the element and then runs some code to start the script, please post that Player is no longer known as _this in this script. //Gonna have to take your word for it until I see the rest of the code Script tries to get player position by using _this but doesnt work so I get an error. EDIT: And before you change anything, put a hint at the top of your script and post the output Change: _caller = _this select 0; _pos = _this select 1; _target = _this select 2; _is3D = _this select 3; _id = _this select 4; _data= [_caller, _id]; To: hint str _this; copyToClipboard _this; //DO NOT COPY ANYTHING NOW, you will erase what's saved in your clipboard. When you write your new post, just press ctrl + v to paste the output (which would be your scripts input) _caller = _this select 0; _pos = _this select 1; _target = _this select 2; _is3D = _this select 3; _id = _this select 4; _data= [_caller, _id];
  9. dreadedentity

    disable tyre damage

    tested with my vehicle diagnostic tool: this addEventHandler ["HandleDamage", { if ((_this select 1) find "wheel" != -1) then { 0; }else { (_this select 2); }; }];
  10. dreadedentity

    Init.sqf not intialising

    please post the full contents of your init.sqf here
  11. maybe: player addEventHandler ["Respawn", { ["a11",_this select 1,3] execVM "markerscript.sqf"; }];
  12. dreadedentity

    Problem implementing scripted action on body

    just add the action directly to the corpse
  13. dreadedentity

    isServer

    /* Dedicated Server: */ isServer //true isDedicated //true hasInterface //false /* Player-hosted Server: */ isServer //true isDedicated //false hasInterface //true /* Normal Client: */ isServer //false isDedicated //false hasInterface //true /* Headless Client: */ //not really sure if headless can be server hasInterface //false
  14. dreadedentity

    isPosIn2DArea [function]

    Not sure where these calculations come into play, but creating a "virtual zone" that is 10 meters wide and 10 meters tall could not be any simpler than: _playerPos = getPosATL player; while {true} do { if ([[5,5,0,true], _playerPos] call BIS_fnc_inTrigger) then { hintSilent "You're inside" }else { hintSilent "You're outside" }; sleep 0.02; };
  15. dreadedentity

    isPosIn2DArea [function]

    Nice work, just curious, how does this function deal with situations like this? Also, BIS has a function similar to this, BIS_fnc_inTrigger
  16. dreadedentity

    isServer

    I just hope you keep the picture in your server for a looooong time, I plan to link this over and over again :)
  17. dreadedentity

    isServer

    (not sarcasm) a perfect representation of the relationship between client/server and locality effects of different commands. Everything you need to know about multiplayer is right there in this picture
  18. dreadedentity

    isServer

    if (IsServer) then { ["isServer TRUE", "systemChat", true] call BIS_fnc_MP; } else { ["isServer FALSE", "systemChat", true] call BIS_fnc_MP; }; if (isDedicated) then { ["isDedicated TRUE", "systemChat", true] call BIS_fnc_MP; } else { ["isDedicated FALSE", "systemChat", true] call BIS_fnc_MP; };
  19. dreadedentity

    Changing weapons of enemy units

    I agree, I'll be using a similar snippet for my next release, whenever I finish the new feature, and finish debugging (everything works, but there's one really nasty bug I can't figure out how to fix. It doesn't even break anything, just makes a "config not found" popup) Probably BIS, I mean we're not really obligated to do anything lol, but they've got so much on their plate already
  20. I haven't looked inside any revive scripts and I don't really plan to, but just reading this bug report makes me think that the "fired" event handler never goes off. Try disabling farooq's revive and see if it works then, after that we can make some progress on an alternate system
  21. dreadedentity

    Changing weapons of enemy units

    @IndeedPete I like this line from your code: isClass(configFile >> "CfgWeapons" >> "hlc_rifle_ak74") For some reason activatedAddons doesn't work, at least when I tried last night (only listed dev-created pbo's), but I saw that you can use the same method with CfgPatches to check if an addon is activated: isClass(configFile >> "CfgPatches" >> "YOUR_MOD_NAME_AS_IT'S_LISTED_IN_CFGPATCHES") An extremely minor change, it really doesn't do anything extra from what you've already got, I just think it's a little cleaner
  22. dreadedentity

    Changing weapons of enemy units

    no, you need to script
×