-
Content Count
1224 -
Joined
-
Last visited
-
Medals
Everything posted by dreadedentity
-
How to check if all alive players are in a specific vehicle's cargo
dreadedentity replied to TacoTuesday's topic in ARMA 3 - MISSION EDITING & SCRIPTING
local variables cannot be use in editor -
Random delete script
dreadedentity replied to groshnak's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; -
Mulitplayer credits
dreadedentity replied to captainclaw's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; -
Does mods cause lag, , slows down and conflict with your mission scripts?
dreadedentity replied to Coolinator's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
Error Zero Divisor, Multi-Dimensional array
dreadedentity replied to Alex116's topic in ARMA 3 - MISSION EDITING & SCRIPTING
"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) -
OO_CAMERA - oriented object camera
dreadedentity replied to code34's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
Mulitplayer credits
dreadedentity replied to captainclaw's topic in ARMA 3 - MISSION EDITING & SCRIPTING
would be a lot faster -
Move marker to thrown position of smoke/chemlight?
dreadedentity replied to doubledizz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No problem, good luck -
Error Zero Divisor, Multi-Dimensional array
dreadedentity replied to Alex116's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
Error Zero Divisor, Multi-Dimensional array
dreadedentity replied to Alex116's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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]; -
disable tyre damage
dreadedentity replied to redarmy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
anytime -
disable tyre damage
dreadedentity replied to redarmy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
tested with my vehicle diagnostic tool: this addEventHandler ["HandleDamage", { if ((_this select 1) find "wheel" != -1) then { 0; }else { (_this select 2); }; }]; -
Init.sqf not intialising
dreadedentity replied to moharisy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
please post the full contents of your init.sqf here -
How to track respawned unit, name changes on respawn?
dreadedentity replied to groshnak's topic in ARMA 3 - MISSION EDITING & SCRIPTING
maybe: player addEventHandler ["Respawn", { ["a11",_this select 1,3] execVM "markerscript.sqf"; }]; -
Problem implementing scripted action on body
dreadedentity replied to Th3IndianCannon's topic in ARMA 3 - MISSION EDITING & SCRIPTING
just add the action directly to the corpse -
/* 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
-
isPosIn2DArea [function]
dreadedentity replied to hansen111's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; }; -
isPosIn2DArea [function]
dreadedentity replied to hansen111's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nice work, just curious, how does this function deal with situations like this? Also, BIS has a function similar to this, BIS_fnc_inTrigger -
I just hope you keep the picture in your server for a looooong time, I plan to link this over and over again :)
-
(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
-
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; };
-
Changing weapons of enemy units
dreadedentity replied to alanford's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
Anyone knows a good Anti Team Kill script that works for coop mission multiplayer?
dreadedentity replied to Coolinator's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
Changing weapons of enemy units
dreadedentity replied to alanford's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@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 -
Changing weapons of enemy units
dreadedentity replied to alanford's topic in ARMA 3 - MISSION EDITING & SCRIPTING
no, you need to script