Jump to content

LoonyWarrior

Member
  • Content Count

    110
  • Joined

  • Last visited

  • Medals

Everything posted by LoonyWarrior

  1. Transform simple message to the BorderGuard ! Hello ! I would like to introduce You the BorderGuard, advanced border protection for DM and TMD multiplayer missions with limited combat zone. Download: BorderGuard 1.3 (Two examples included) NOTE: BorderGuard is completely Client side script, It will be executed only on Live Servers there is nothing to do on Dedicated Servers NOTE: All globals defined in this and in all my other scripts have prefix 'LW_' (there is no exception) What does it do ? When player enter/leave specific trigger BorderGuard displays warning and creates new task. Player then have to go back to combat zone to successfully complete the task, if he fail to do so or if he stay in/out of the trigger he is executed. This task is always removed after completion, BorderGuard additionally provides task for whole mission and it's final state depends on player's behavior during the match. To satisfy all needs BorderGuards provides 7 parameters ready to be assigned from paramsArray, it can also handle with both 'simple borders' and 'multiple borders' and for debug purposes You can use system messages to monitor BorderGuards actions. Parameters: BorderGuard Mode Action Delay BorderGuard May Kill Task Delay Task Distance Task Duration Warning Style Additional Options: Create Borders Simple Borders System Messages Two Ways One Solution Simple Borders: You have two triggers surrounding whole combat zone, BorderGuard is activated when player leaves the triggers In this case the smaller trigger have to has specified name 'LW_InnerBorder' and all what You have to do is to run BorderGuard on activation. Player will be always tasked to move in direction of center of the trigger. Multiple Borders: You have multiple triggers around whole combat zone, BorderGuard is activated when player enters the trigger In this case u have to provide the center of combat zone by marker(s) with name 'LW_BorderGuardMarker', if You have, for example, combat zone with shape L You will have to provide more then one 'center', if You need to do so use same name with index 'LW_BorderGuardMarker_#'. Player will be tasked to move in direction of the nearest marker. NOTE: BorderGuard searches for 'LW_BorderGuardMarker' and 'LW_BorderGuardMarker_1' if the '_1' is found it continues on '_2' until '_#' returns position [0, 0, 0]. 'LW_BorderGuardMarker_0' will be always skipped. (just for sure.. I noticed that color check 'trick' but [0, 0, 0] will be hardly center of combat zone right ?) Implementation Files: Copy BorderGuard to Your mission folder and '#include' the BorderGuard.sqf in your init.sqf Based on where did You placed the BorderGuard change the value of '_LW_path_functionsBorderGuard' inside BorderGuard.sqf. Additionally You can copy parameters from BorderGuard.sqf to the init.sqf, just make sure that You comment them in BorderGuard.sqf. [*]Copy the BorderGuard project from stringtable.xml (provided with BorderGuard) and place it under your project in your stringtable.xml Editor: Simple Borders Create two triggers Trigger representing inner border Name: LW_InnerBorder Shape: Rectangle Type: None Activation: Anybody - Repeatedly - Present Condition: alive player && !(player in thisList) On Activation: LW_scr_borderGuard = [] spawn LW_fnc_borderGuard; [*]Trigger representing outer border Name: LW_OuterBorder Shape: Rectangle Type: None Activation: Anybody - Repeatedly - Present Condition: alive player && !(player in thisList) On Activation: _null = [] spawn LW_fnc_borderGuardExecution; [*]Multiple Borders Create two triggers Trigger representing inner border Name: LW_InnerBorder Shape: Rectangle Type: None Activation: Anybody - Repeatedly - Present Condition: alive player && player in thisList On Activation: LW_scr_borderGuard = [] spawn LW_fnc_borderGuard; On Deactivation: call LW_fnc_borderGuardTerminator; [*]Trigger representing outer border Name: LW_OuterBorder Shape: Rectangle Type: None Activation: Anybody - Repeatedly - Present Condition: alive player && player in thisList On Activation: _null = [] spawn LW_fnc_borderGuardExecution; [*]Copy them around your combat zone [*]Create BorderGuardMarker in center of your combat zone Mission End: Don't forget to complete BorderGuard's mission task, befor You call for 'endMission' call for 'LW_fnc_borderGuardMissionTaskComplete' Details Deployed Functions LW_fnc_borderGuard LW_fnc_borderGuardExecution LW_fnc_borderGuardCheckDistance LW_fnc_borderGuardMarkers LW_fnc_borderGuardMissionTask LW_fnc_borderGuardMissionTaskComplete LW_fnc_borderGuardTask LW_fnc_borderGuardTaskComplete LW_fnc_borderGuardTaskRemove LW_fnc_borderGuardTerminator LW_fnc_borderGuardWarning
  2. working solution can be found here................ http://loonywarrior.dyndns.org/arma/Experiment_5.Stratis.zip
  3. onPlayerDisconnected is fired after the actual disconect... player isnt there anymore............ and u cant depend on it, since it doesnt have to be fired... :(
  4. LoonyWarrior

    what is "_x"?

    lies and stupidity... what can i say ? http://loonywarrior.dyndns.org/arma/Experiment_5.Stratis.zip
  5. LoonyWarrior

    what is "_x"?

    at this point i hope that other ppl will see how many post i edited that thread... :eek:
  6. LoonyWarrior

    what is "_x"?

    if isServer then { { _x addEventHandler ["killed", { ["Task_Objectives", "Failed"] call BIS_fnc_taskSetState; [["end1", true, true], "BIS_fnc_endMission", true, true] spawn BIS_fnc_MP; }]; } forEach [c1,c2,c3,c4,c5,c6,c7,c8,c9]; }; ---------- Post added at 19:05 ---------- Previous post was at 19:04 ---------- u should start here http://forums.bistudio.com/showthread.php?158297-arma-MP-mission-ending-not-working
  7. LoonyWarrior

    Briefing.sqf entry ordering?

    its normal behavior... last is on top... (its same for created subjects..)
  8. may i ask u how old re u ? ....its about the same thing........... endMission is LOCAL thing u HAVE TO execute it on EACH client..... ...from the first page its still about the same thing and u re not listening to us... _x addEventHandler ["killed", {["Task_Objectives", "Failed"] call BIS_fnc_taskSetState; [color="#FF0000"][["end1", true, true], "BIS_fnc_endMission", true, true] spawn BIS_fnc_MP;[/color]}]} forEach [c1,c2,c3,c4,c5,c6,c7,c8,c9];
  9. oki its really better ;) ..thx
  10. try change if (playerrespawntime < 1 || !isplayer _unit) exitwith {}; if (playerrespawntime < 1 || !isplayer _unit || side (group _unit) != resistance) exitwith {}; BIS_fnc_respawnMenuPosition disableserialization; _unit = [_this,0,objnull,[objnull]] call bis_fnc_param; _respawnDelay = [_this,3,0,[0]] call bis_fnc_param; if (!alive _unit) then { if (playerrespawntime < 1 || !isplayer _unit) exitwith {}; setplayerrespawntime (playerrespawntime + 3); sleep 2; cutText ["","black out",0.5]; sleep 1; cutText ["","black in"]; /////////////////////////////////////////////////////////////////////////////////////////// //--- onPlayerKilled /////////////////////////////////////////////////////////////////////////////////////////// BIS_fnc_respawnMenuPosition_draw = { _ctrlMap = _this select 0; _display = ctrlparent _ctrlMap; _ctrlList = _display displayctrl BIS_fnc_respawnMenuPosition_ctrlList; _selected = _ctrlList lbvalue lbcursel _ctrlList; //--- Draw icons on respawn positions _color = playerside call bis_fnc_sidecolor; _icon = "selector_selectedFriendly" call bis_fnc_textureMarker; _iconSelected = "selector_selectedMission" call bis_fnc_textureMarker; { _colorLocal = if (_foreachindex == BIS_fnc_respawnMenuPosition_selected) then {[1,1,1,1]} else {_color}; _iconLocal = if (_foreachindex == _selected) then {_iconSelected} else {_icon}; _ctrlMap drawicon [ _iconLocal, _colorLocal, _x call bis_fnc_position, 48, 48, time * 16, "", 1 ]; } foreach BIS_fnc_respawnMenuPosition_positions; }; BIS_fnc_respawnMenuPosition_mouseMoving = { _ctrlMap = _this select 0; _mX = _this select 1; _mY = _this select 2; _dis = 0.048; _selected = -1; { _pos = _ctrlMap ctrlmapworldtoscreen (_x call bis_fnc_position); if (_pos distance [_mX,_mY] < _dis) then { _selected = _foreachindex; }; } foreach BIS_fnc_respawnMenuPosition_positions; BIS_fnc_respawnMenuPosition_selected = _selected; }; BIS_fnc_respawnMenuPosition_mouseButtonClick = { _ctrlMap = _this select 0; _button = _this select 1; if (_button == 0 && BIS_fnc_respawnMenuPosition_selected >= 0) then { _display = ctrlparent _ctrlMap; _ctrlList = _display displayctrl BIS_fnc_respawnMenuPosition_ctrlList; //BIS_fnc_respawnMenuPosition_systemSelect = true; //_ctrlList lbsetcursel (BIS_fnc_respawnMenuPosition_selected + 1); BIS_fnc_respawnMenuPosition_respawn = BIS_fnc_respawnMenuPosition_positions select BIS_fnc_respawnMenuPosition_selected; BIS_fnc_respawnMenuPosition_systemSelect = true; _ctrlList lbsetcursel (BIS_fnc_respawnMenuPosition_selected + 1); }; }; [ "Select Respawn Point", { scriptname "BIS_fnc_respawnMenuPosition"; _fnc_scriptName = "BIS_fnc_respawnMenuPosition"; disableserialization; _mode = _this select 0; _ctrlListBackground = _this select 1; _ctrlList = _this select 2; _ctrlContentBackground = _this select 3; _ctrlContentGroup = _this select 4; _ctrlContent = _this select 5; _ctrlMap = _this select 6; switch _mode do { case "init": { _ctrlContentBackground ctrlshow false; _ctrlContentGroup ctrlshow false; _ctrlContentGroup ctrlenable false; _ctrlMap ctrlshow true; BIS_fnc_respawnMenuPosition_ctrlList = ctrlIDC _ctrlList; BIS_fnc_respawnMenuPosition_selected = -1; BIS_fnc_respawnMenuPosition_positions = []; _ctrlMap ctrladdeventhandler ["draw","_this call BIS_fnc_respawnMenuPosition_draw;"]; _ctrlMap ctrladdeventhandler ["mouseMoving","_this call BIS_fnc_respawnMenuPosition_mouseMoving;"]; _ctrlMap ctrladdeventhandler ["mouseHolding","_this call BIS_fnc_respawnMenuPosition_mouseMoving;"]; _ctrlMap ctrladdeventhandler ["mouseButtonClick","_this call BIS_fnc_respawnMenuPosition_mouseButtonClick;"]; }; case "select": { if (lbsize _ctrlList == 0) exitwith {}; if (BIS_fnc_respawnMenuPosition_systemSelect) exitwith {BIS_fnc_respawnMenuPosition_systemSelect = false;}; _commitTime = 0.5; _positionID = _ctrlList lbvalue lbcursel _ctrlList; if (_positionID < 0) then { BIS_fnc_respawnMenuPosition_respawn = ""; } else { _position = BIS_fnc_respawnMenuPosition_positions select _positionID; _ctrlMap ctrlmapanimadd [_commitTime,(ctrlmapscale _ctrlMap) max 0.1,_position call bis_fnc_position]; ctrlmapanimcommit _ctrlMap; BIS_fnc_respawnMenuPosition_respawn = _position; }; }; case "update": { _selected = _ctrlList lbdata lbcursel _ctrlList; if (_selected == "") then {_selected = missionnamespace getvariable ["BIS_fnc_respawnMenuPosition_respawn",""];}; //--- Preload the selected scene if (str _selectedPos != """""") then { preloadcamera (_selected call bis_fnc_position); if (typename _selected == typename objnull) then {1 preloadobject _selected}; }; _respawnPositions = (playerside call bis_fnc_getRespawnMarkers) + (player call bis_fnc_getRespawnPositions); if (str _respawnPositions == str BIS_fnc_respawnMenuPosition_positions) exitwith {}; BIS_fnc_respawnMenuPosition_positions = _respawnPositions; BIS_fnc_respawnMenuPosition_systemSelect = !isnil {BIS_fnc_respawnMenuPosition_systemSelect}; if (count _respawnPositions > 0) then { lbclear _ctrlList; _lbAdd = _ctrlList lbAdd "<Random>"; //--- ToDo: Localize _ctrlList lbsetvalue [_lbAdd,-1]; _cursel = 0; { _text = ""; _picture = ""; _canAdd = true; switch (typename _x) do { case (typename ""): { _text = markertext _x; _picture = (markertype _x) call bis_fnc_textureMarker; }; case (typename objnull): { _text = (configfile >> "cfgvehicles" >> typeof _x) call bis_fnc_displayName; _picture = gettext (configfile >> "cfgvehicles" >> typeof _x >> "icon") call bis_fnc_textureVehicleIcon; _canAdd = !isnull _x; }; case (typename []): { }; }; if (_canAdd) then { if (_text == "") then {_text = format ["Grid %1",mapgridposition (_x call bis_fnc_position)]}; //--- ToDo: Localize if (_picture == "") then {_picture = "#(argb,8,8,3)color(0,0,0,0)";}; _lbAdd = _ctrlList lbadd _text; _ctrlList lbsetvalue [_lbAdd,_foreachindex]; _ctrlList lbsetpicture [_lbAdd,_picture]; if (str _x == str _selected) then {_cursel = _lbAdd;}; }; } foreach _respawnPositions; _ctrlList lbsetcursel _cursel; } else { ["No respawn positions found"] call bis_fnc_error; }; }; }; } ] call bis_fnc_showRespawnMenu; } else { /////////////////////////////////////////////////////////////////////////////////////////// //--- onPlayerRespawn /////////////////////////////////////////////////////////////////////////////////////////// if (isplayer _unit) then { //--- Player - teleport to selected position [] call bis_fnc_showRespawnMenu; _respawn = BIS_fnc_respawnMenuPosition_respawn; if (str _respawn == """""") then {_respawn = BIS_fnc_respawnMenuPosition_positions call bis_fnc_selectrandom;}; [_unit,_respawn] call bis_fnc_moveToRespawnPosition; //--- Clean-up BIS_fnc_respawnMenuPosition_draw = nil; BIS_fnc_respawnMenuPosition_mouseMoving = nil; BIS_fnc_respawnMenuPosition_mouseButtonClick = nil; BIS_fnc_respawnMenuPosition_systemSelect = nil; BIS_fnc_respawnMenuPosition_positions = nil; with uinamespace do { BIS_fnc_respawnMenuPosition_ctrlList = nil; BIS_fnc_respawnMenuPosition_positions = nil }; setplayerrespawntime _respawnDelay; } else { //--- AI - teleport to random position _respawnPositions = (side group _unit) call bis_fnc_respawnBaseMarkers; if (count _respawnPositions > 0) then { _respawn = _respawnPositions call bis_fnc_selectrandom; switch (typename _respawn) do { case (typename ""): { _unit setpos markerpos _respawn; }; }; }; }; };
  11. no no no no no... :rolleyes: look.. u re doing it bad and the editor makes it even worse.. use triggers for "area based activation"
  12. its not my topic :confused: ....look better :p
  13. zooloo look at this http://forums.bistudio.com/showthread.php?158373-How-to-make-a-private-pbo
  14. LoonyWarrior

    How to make a private pbo?

    u can save values to the profile.... :) i already thought about how to do that.. http://loonywarrior.dyndns.org/arma/Experiment_3.Stratis.zip its not finished, it doesnt save the information but it already shows how to store them... i decided to use two arrays.. the profiles and the sessions.. profiles re stored in server profile and based on UIDs.. when client joins the server, server pick the profile from profiles and store it as session and sessions re based on IDs.. two rules... client never knows the profile ID client never knows the session ID btw.. i forget the best part.. its ment to be "modulable".. the ProfileManager just maintain the profiles.. but im actualy working on another script and i want to finish it first....
  15. LoonyWarrior

    How to make a private pbo?

    sorry but did u really think about that ? ...thouse values re stored in NAME.vars.Arma3Profile in Documents........ the only solution is to store the values only on the server.......
  16. :p class CfgRespawnTemplates { //--- Defaults respawnTemplatesNone[] = {"None"}; respawnTemplatesBird[] = {"Spectator","EndMission"}; respawnTemplatesInstant[] = {"Instant","Counter"}; respawnTemplatesBase[] = {"Base","Counter"}; respawnTemplatesGroup[] = {"Group","EndMission"}; respawnTemplatesSide[] = {"Side","EndMission"}; class None { displayName = "None"; onPlayerKilled = "BIS_fnc_respawnNone"; }; class Spectator { displayName = "Spectator"; onPlayerKilled = "BIS_fnc_respawnSpectator"; onPlayerRespawn = "BIS_fnc_respawnSpectator"; }; class Instant { displayName = "Instant"; onPlayerKilled = "BIS_fnc_respawnInstant"; onPlayerRespawn = "BIS_fnc_respawnInstant"; }; class Base { displayName = "Base"; onPlayerKilled = "BIS_fnc_respawnBase"; onPlayerRespawn = "BIS_fnc_respawnBase"; }; class Group { displayName = "Group"; onPlayerRespawn = "BIS_fnc_respawnGroup"; }; class Side { displayName = "Side"; onPlayerRespawn = "BIS_fnc_respawnSide"; }; //--- Custom class EndMission { displayName = "EndMission"; onPlayerRespawn = "BIS_fnc_respawnEndMission"; }; class Seagull { displayName = "Seagull"; onPlayerRespawn = "BIS_fnc_respawnSeagull"; }; class Wave { displayName = "Wave"; onPlayerKilled = "BIS_fnc_respawnWave"; onPlayerRespawn = "BIS_fnc_respawnWave"; }; class TimePenalty { displayName = "Time Penalty"; onPlayerKilled = "BIS_fnc_respawnTimePenalty"; onPlayerRespawn = "BIS_fnc_respawnTimePenalty"; }; class Counter { displayName = "Counter"; onPlayerKilled = "BIS_fnc_respawnCounter"; onPlayerRespawn = "BIS_fnc_respawnCounter"; }; class Confirm { displayName = "Confirm"; onPlayerKilled = "BIS_fnc_respawnConfirm"; onPlayerRespawn = "BIS_fnc_respawnConfirm"; }; class MenuPosition { displayName = "Select Position"; onPlayerKilled = "BIS_fnc_respawnMenuPosition"; onPlayerRespawn = "BIS_fnc_respawnMenuPosition"; }; class MenuInventory { displayName = "Select Inventory"; onPlayerKilled = "BIS_fnc_respawnMenuInventory"; onPlayerRespawn = "BIS_fnc_respawnMenuInventory"; }; };
  17. _MarkerE isnt variable but part of the string
  18. hmm hmm ...when u die... u change side... to civ till another respawn... do u really try that from unit from different side ? try this condition.. "side (group _this) != side (group _target)"
  19. its just theory but u should be able to create new template and use the same dialog as in menuposition template..
  20. LoonyWarrior

    removeAction problem

    did u try ..in (items player)
  21. im not an "editor guy".. :o ....i have no idea... but that code... thats like magic... execute that on one machine and game ends for all... :) and u can also define your own end... http://community.bistudio.com/wiki/Debriefing
  22. tunning :) this addaction ["interact",{hint "Give me a ride"},nil,0,true,true,"","side _this != side _target"];
  23. how do u call the end ? endMission is local thing.. and u have to execute that on each client.. try this: [[_end, true, 2], "BIS_fnc_endMission", true, true] spawn BIS_fnc_MP; change or define _end...
  24. LoonyWarrior

    CfgDebriefing - pictures

    thanks.. ....im looking for scull with crossed bones.. i saw it this weekend and im convinced that it was in-game img..
×