Jump to content

LoonyWarrior

Member
  • Content Count

    110
  • Joined

  • Last visited

  • Medals

Posts posted by LoonyWarrior


  1. LoonyWarrior I would prefer you didnt comment if your not going to help! you edited every post you made on that link. And told me I wasnt listening even though I was doing what you said to do!

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


  2. 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 ----------

    Can you clarify? I'm not understanding what you mean exactly. Are you asking what [c1,c2,c3,c4,c5,c6,c7,c8,c9] is?

    u should start here http://forums.bistudio.com/showthread.php?158297-arma-MP-mission-ending-not-working


  3. I stopped trying to use the Create Diary Notes modules since they seem a bit buggy and have been just using a plain briefing.sqf file, but I can't for life of me make heads or tails of how to order them correctly in the text file so the first diary note the player sees is at top, and it's selected by default.

    It actually appears that the diary notes show up in reverse order from top to bottom in the briefing screen compared to how they are in the .sqf file. Sometimes the top entry in the Briefing screen is highlighted first, sometimes the bottom.

    On the positive side, I did figure out you can make a whole new heading using createDiarySubject which at least made me feel better. :)

    its normal behavior... last is on top... (its same for created subjects..)


  4. 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];


  5. 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;
    			};
    		};
    	};
    };
    };
    


  6. 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....


  7. Hi;

    I have a mission with level system and an economic system and I use "saveProfileNamespace" to save variables to disconnect.

    I do not want someone to download the mission, change variables and save his variables to cheat.

    This could fix if nobody can open and edit the mission.

    How I can get it?

    A greeting and thanks

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


  8. :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";
    };
    };


  9. Thanks both the the replies so far.

    I will investigate what can be done with the preprocesser commands, however highly doubt the solution is in there.

    @LoonyWarrior: you describe the process of writing your own respawn templates. however i would like to use the default 'MenuPosition' type respawn for GREEN, while BLUE only have 1 spawnpoint does not need this extra option.

    The optimal solution would be to do already the side switch inside description.ext.

    example:

    switch (playerSide) do
    {
       case west: 
       {
        respawnTemplates[] = {"Wave","Counter","MenuPosition"};
       }
    
       case resistance: 
       {
        respawnTemplates[] = {"Wave","Counter"};
       }
    }
    

    But that i dont even have to try, as it will obviously not work from the Description.ext :D

    its just theory but u should be able to create new template and use the same dialog as in menuposition template..


  10. hi

    does anybody know in which .pbo file re stored the pictures available, for example, in CfgDebriefing..?

    class CfgDebriefing
    {  
    class End1
    {
    	title = "Mission Completed";
    	subtitle = "";
    	description = "You successfully rescued our forces and neutralized the spotters, despite being forced to retreat.";
    	pictureBackground = "";
    	picture = "[color="#FF0000"]b_inf[/color]";
    	pictureColor[] = {0.0,0.3,0.6,1};
    };
    };

×