Jump to content

dreadedentity

Member
  • Content Count

    1224
  • Joined

  • Last visited

  • Medals

Everything posted by dreadedentity

  1. I forgot something. Make sure you don't put any trustedUIDs first though, so we can see if it works
  2. No problem, let me know if something doesn't work, but add details!
  3. 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 }; };
  4. dreadedentity

    Player as Camera Script

    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
  5. Excellent, now that you've explained what you want, we can help
  6. dreadedentity

    Player as Camera Script

    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".
  7. 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
  8. This is really confusing. I'm not sure what you're asking for. Do you want something like this? myArray2 select (myArray1 select myVariable);
  9. dreadedentity

    Score for kill AI

    They've done a well enough job already, now it's up to us as script writers to write low-cost code
  10. dreadedentity

    Score for kill AI

    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
  11. dreadedentity

    Score for kill AI

    Just remember that the "killed" event handler is local, so you should only create them on the server
  12. 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
  13. dreadedentity

    Laser Designation

    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
  14. dreadedentity

    [RELEASE] After Action Report

    Very cool, I think you've given me an idea
  15. 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!
  16. 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);
  17. 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?
  18. Well it doesn't...but you need to store that information in the variable anyway to publicVariable it...
  19. 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
  20. dreadedentity

    Are there any beds in Arma 3?

    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
  21. dreadedentity

    How to hide respawn tent markers?

    Is this from a mod or script? You'll need to know the name of the marker to change anything about it
  22. You could use #include "myScript.sqf" or spawn compileFinal preprocessFileLineNumbers "myScript.sqf"
  23. 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);
×