-
Content Count
1224 -
Joined
-
Last visited
-
Medals
Everything posted by dreadedentity
-
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 forgot something. Make sure you don't put any trustedUIDs first though, so we can see if it works -
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
No problem, let me know if something doesn't work, but add details! -
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
looks right -
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
Well try something like this: (ALL UNTESTED - JUST THEORY) ONLY SERVER RUNS THIS trustedUIDs = []; teamkillLimit = 5; "unitConnected" addPublicVariableEventHandler { (_this select 1) addEventHandler ["killed", handleTeamkill]; }; ["removeTeamkill", "onPlayerDisconnected", { //not really sure what happens when a player disconnects...does it turn into AI? }] call BIS_fnc_addStackedEventHandler; handleTeamkill = compileFinal ' _unit = _this select 0; _killer = _this select 1; if (((side _unit) == (side _killer)) && {!((getPlayerUID _killer) in trustedUIDs)}) then { missionNamespace setVariable [format ["TK_%1", name _killer], missionNamespace getVariable [format ["TK_%1", name _killer], 0] + 1]; if (missionNamespace getVariable [format ["TK_%1", name _killer], 0] == teamkillLimit) then { ["teamkillEnd", false] BIS_fnc_endMission; }else { [format ["Please do not kill teammates. You have been warned %1 times", missionNamespace getVariable [format ["TK_%1", name _killer], 0]], "systemChat", _killer] call BIS_fnc_MP; }; }; '; //{ // if (isPlayer) then // { // _x addEventHandler ["killed", handleTeamkill]; // }; //}forEach playableUnits; //commented this part out because I think it's not necessary anymore ALL CLIENTS RUN THIS - Put in init.sqf somewhere waitUntil {player == player}; unitConnected = player; publicVariableServer "unitConnected"; Maybe that will work, dunno. Also, you're going to have to set up a mission ending, not sure if you've ever done that before, but it's not that hard. The class should be called "teamkillEnd". EDIT: here's what you should put in description.ext for the mission end: class CfgDebriefing { class teamkillEnd { title = "Mission Failed"; subtitle = "You killed too many teammates."; description = "You killed too many of your teammates."; //intentionally different so you can see where the game puts both messages }; }; -
Player as Camera Script
dreadedentity replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It didn't work because spawn is like a function or a script, you need to give it the information before you can use it inside: 0 = this spawn { while {true} do { removeallweapons _this; sleep 3};}; //any parameters go to the script using the magic variable _this Also, don't use "null" for a variable, because although it is a reserved word in other languages, becoming a dumping ground, in this one it's not. It is a valid variable name and can be defined/redefined with no problem. However, you certainly are allowed to use a number, which cannot be redefined, thus having no adverse effects. Hope that helps -
Need help with Enemy Killed Camera - Fatal Shot Only
dreadedentity replied to sttosin's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Excellent, now that you've explained what you want, we can help -
Player as Camera Script
dreadedentity replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try: player addAction ["Camera", "[] call BIS_fnc_camera"] The reason for my change is that fn_camera.sqf is a script that's going to be compiled by RV and added to the function library. Most likely the reason it crashed, though, is because addAction uses either a string or code ( { } ) for it's second parameter. When that statement was compiled it probably saw this, "a3\functions_f\Debug\fn_camera.sqf", and said "This is weird and I don't like it". -
Need help with Enemy Killed Camera - Fatal Shot Only
dreadedentity replied to sttosin's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If you use a "killed" event handler, it will only activate when the unit it is assigned to dies. The problem with that is that there's no bullet to attach a camera to, however. Using a "fired" event handler like you have will work, but to me it seems like a lot of work because you're going to have to predict the bullet path and time. Just to be clear for everyone else, are you trying to do a sniper elite-esque bullet camera? This could be pretty difficult for the reason I explained above, but what you could try doing is using the "killed" event handler and then inside the code you have a "replay" kinda thing -
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
Would you be a little more specific? -
go from another array selection to another one?
dreadedentity replied to Naiss's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This is really confusing. I'm not sure what you're asking for. Do you want something like this? myArray2 select (myArray1 select myVariable); -
They've done a well enough job already, now it's up to us as script writers to write low-cost code
-
This is a really good way to create a lot of unnecessary traffic over the network. Since the clients never need to have the event handlers installed anyway, this method should be avoided like ebola
-
Just remember that the "killed" event handler is local, so you should only create them on the server
-
CfgSounds for Sound Files In AddOn
dreadedentity replied to Kolmain's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If it's from an addon, I think you can find all of the related configs in CfgPatches, but not sure as I've never used addons -
Laser Designation
dreadedentity replied to spanishsurfer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nobody knows the answer, so that's why you're not getting any responses. At least that's why I didn't answer. This is the only thread I've found that's even remotely similar to what you're trying to do: http://forums.bistudio.com/showthread.php?101839-OA-Music-config-override-bis-pbo Unfortunately it looks like you're going to have to make an addon. I have no knowledge of how to do that, though. Perhaps you can extend the vehicle classes? Anyway, it'll require all players to have your addon downloaded and activated before they're able to join your server, though. They should be able to help you more in the Addon creation section of the forum, here's a link for ease: http://forums.bistudio.com/forumdisplay.php?170-ARMA-3-ADDONS-Configs-amp-Scripting Hope you get this figured out -
[RELEASE] After Action Report
dreadedentity replied to austin_medic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Very cool, I think you've given me an idea -
I've been looking in the 3D editor, but I can't seem to find any? I've found sleeping bags and some kind of mat, but no beds. Do they exist? I need them for a new system I'm working on. Thanks in advance!
-
Is it possible to link a trigger to the destruction of a map object?
dreadedentity replied to kupcho's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It doesn't work, I just tried that. You need to use the object ID's (press ctrl+i in the editor), then use this code for the trigger condition: !alive ((getPos player) nearestObject MY_ID_NUMBER); -
whats the best loot script out there?
dreadedentity replied to jandrews's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Would you want a loot system that continuously spawns loot (ie. every 10 minutes create new loot) or a system that will only spawn loot one time? -
setvehiclevarname is it Global?, if not how?
dreadedentity replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well it doesn't...but you need to store that information in the variable anyway to publicVariable it... -
setvehiclevarname is it Global?, if not how?
dreadedentity replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I don't know why you want to use this command so badly. It doesn't do anything useful EDIT: http://forums.bistudio.com/showthread.php?186608-change-variable-name-Global-how -
Are there any beds in Arma 3?
dreadedentity replied to dreadedentity's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just put two wooden boxes next to each other, they can be found in Objects (Construction), then throw a sleeping bag and some pillows on top. The boxes are the perfect length for the sleeping bag too -
How to hide respawn tent markers?
dreadedentity replied to groshnak's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Is this from a mod or script? You'll need to know the name of the marker to change anything about it -
Is it worth using "execVM" instead of "spawn" to save RAM?
dreadedentity replied to Heeeere's johnny!'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
You could use #include "myScript.sqf" or spawn compileFinal preprocessFileLineNumbers "myScript.sqf" -
Best way to add backpacks with ammo/ AGM supplies into inventory of vehicle
dreadedentity replied to armyinf's topic in ARMA 3 - MISSION EDITING & SCRIPTING
keeping it complicated, eh, JShock? this addBackpackCargoGlobal ["B_AssaultPack_khk", 8]; { if (_forEachIndex <= 1) then { //add AGM medical supplies }; if ((_forEachIndex > 1) && {_forEachIndex <= 3) then { //add hand grenades/smoke grenades }; if (_forEachIndex > 3) then { _x addMagazineAmmoCargo ["STANAG_CLASSNAME", 30, 30]; }; }forEach (everyBackpack this);