Jump to content
Ricardo

Mission Monitor Display

Recommended Posts

Oh i might have missunderstand what u meant, i got a backup of the default files, i was wondering if theres any chance you would send me the files with the monitor, if not it's totally ok.

 

Im gratefull enough with the help you are giving me :)

 

I still can't get the monitor to work with the picture :(

Share this post


Link to post
Share on other sites

Hi All, 

 

I have managed to get this working :) 

Herewith the details and explanation:

For example: In your mission file (whichever it happens to be e.g. DZMS (have not tested WAI or SARG or the 4 side-event missions - but I assume the basic fundamentals are the same) - I have tested EMS - so tutorial will be based on that. (based on DZMS so should work) and will be implemented over the course of the day.

First and foremost - you MUST find an item that has a .p3d associated to it - the way I did it was launch infistar, go to spawn menu, select the category (e.g. weapons or magazines) scroll until I find an item that has a thumbnail (this thumbnail is from the .p3d file)

If the item in question has a thumbnail - it WILL work.

 

So, lets take my SM1.sqf from EMS

 

1. Private array change: 

 

 

Add ,"_hint" to your private array

Before: 
 

private ["_missName","_coords","_vehicle","_crate","_crash"];

After: 
 

private ["_missName","_coords","_vehicle","_crate","_crash","_hint"];

 

2. Create array and class:

 

 

find:

[nil,nil,rTitleText,"A bandit hunting party has been spotted! Check your map for the location!", "PLAIN",10]

and comment it out (by adding a // before the line)

 

Add 
 

_ARRAYNAMEHERE = ["ITEM1","ITEM2"];
_CLASSNAMEHERE = _ARRAYNAMEHERE call BIS_fnc_selectRandom; 
 
directly above the line you just commented out - so it should look like this: 
 
_ARRAYNAMEHERE = ["ITEM1","ITEM2"];
_CLASSNAMEHERE = _ARRAYNAMEHERE call BIS_fnc_selectRandom; 


//[nil,nil,rTitleText,"A bandit hunting party has been spotted! Check your map for the location!", "PLAIN",10] call RE;
Just below the commented line add: 
 
 
_picture = getText (configFile >> "cfgWeapons" >> _CLASSNAMEHERE >> "picture"); //this will be %1
_hint = parseText format ["
<t size='3'font='Bitstream'align='Center'color='#ff0000'>Bandit Hunting Party</t><br/><br/>
<t align='center'><img size='8' image='%1'/></t><br/>
<t size='1'font='Bitstream'align='Center'color='#ff0000'>A bandit hunting party has been spotted!</t><br/>
<t size='1'font='Bitstream'align='Center'color='#ff0000'>Check your map for the location!</t><br/>",
_picture
];
[nil,nil,rHINT,_hint] call RE;

 

Explanation of the options here: 

 

1: _ARRAYNAMEHERE - this is whatever you want to call your array - can be anything - provided it is not already in use within the file you are using

2: _CLASSNAMEHERE - this is whatever you want to call your class - this will be used to call the array

3: ITEM1, ITEM2 - this is which ever item you want to use  - keep in mind - the item MUST have a .p3d file attached to it. - so for example "huntingrifle" aka CZ550

In the last "Code" box it says the following: 
 

_picture = getText (configFile >> "cfgWeapons" >> _CLASSNAMEHERE >> "picture"); //this will be %1

cfgWeapons - this can be either: cfgWeapons, cfgAmmo, cfgMoves, cfgVehicles and it MUST!!!! correspond to the ITEM1 and ITEM2 in your array. So coming back to the example, "huntingrifle", you cannot put cfgVehicles in there as it is a weapon and not a car.

Now, I am sure there is a MUCH better way of doing this, but for me - this works - if there is a better way - please feel free to edit / create / test / post

I will be sending this to Fuchs to see if he / she will update accordingly and bundle it together with an update.

edit - forgot to mention: 

 

Create a new file called "messages.sqf" and place the following in there: 

 

fnc_remote_message = {
    private ["_type", "_message", "_player"];
    _type = _this select 0;
    _message = _this select 1;
    if (count _this > 2) then {
        _player = _this select 2;
        if (_player == player) then {
            switch (_type) do {
                case "globalChat": {
                    player globalChat _message;
                };
                case "hint": {
                    hint _message;
                };
                case "titleCut": {
                    titleCut [_message, "PLAIN DOWN", 3];
                };
                case "titleText": {
                    titleText [_message, "PLAIN DOWN"]; titleFadeOut 10;
                };
            };
        };
    } else {
        switch (_type) do {
            case "hint": {
                hint _message;
            };
            case "titleCut": {
                titleCut [_message,"Plain Down",3];
            };
            case "titleText": {
                titleText [_message, "PLAIN DOWN"]; titleFadeOut 10;
            };
        };
    };
};

"customRemoteMessage" addPublicVariableEventHandler {(_this select 1) call fnc_remote_message;};

 

Place this file in the root of your mission pbo and call it from your init.sqf by adding: 

 

_nil = [] execVM "messages.sqf"; into your if (isServer) { ... } block

Share this post


Link to post
Share on other sites
_picture = getText (configFile >> "CfgVehicles" >> _guncar >> "picture"); //this will be %1
_hint = parseText format ["
<t size='3'font='Bitstream'align='Center'color='#ff0000'>Armed vehicle</t><br/><br/>
<t align='center'><img size='8' image='%1'/></t><br/>
<t size='1'font='Bitstream'align='Center'color='#ff0000'>Mission secured!</t><br/>,
_picture
];
[nil,nil,rHINT,_hint] call RE;
} else {
	clean_running_mission = True;
	deleteVehicle _veh;
	deleteVehicle _box;
	{_cleanunits = _x getVariable "missionclean";
	if (!isNil "_cleanunits") then {
		switch (_cleanunits) do {
			case "ground" :  {ai_ground_units = (ai_ground_units -1);};
			case "air" :     {ai_air_units = (ai_air_units -1);};
			case "vehicle" : {ai_vehicle_units = (ai_vehicle_units -1);};
			case "static" :  {ai_emplacement_units = (ai_emplacement_units -1);};
		};
		deleteVehicle _x;
		sleep 0.05;
	};	
	} forEach allUnits;

Hi after putting this into the WAI missions they wont stop and clear after been taken. It broke the end-mission function. RPT says there is a ] missing but can not figure out where.

Anybody willing to help? Would be awesome.

Share this post


Link to post
Share on other sites

Hi after putting this into the WAI missions they wont stop and clear after been taken. It broke the end-mission function. RPT says there is a ] missing but can not figure out where.

Anybody willing to help? Would be awesome.

 

This is the DZMS forum, not the WAI thread.

Share this post


Link to post
Share on other sites

Hi All, 

 

I have managed to get this working :) 

Herewith the details and explanation:

For example: In your mission file (whichever it happens to be e.g. DZMS (have not tested WAI or SARG or the 4 side-event missions - but I assume the basic fundamentals are the same) - I have tested EMS - so tutorial will be based on that. (based on DZMS so should work) and will be implemented over the course of the day.

First and foremost - you MUST find an item that has a .p3d associated to it - the way I did it was launch infistar, go to spawn menu, select the category (e.g. weapons or magazines) scroll until I find an item that has a thumbnail (this thumbnail is from the .p3d file)

If the item in question has a thumbnail - it WILL work.

 

So, lets take my SM1.sqf from EMS

 

1. Private array change: 

 

 

Add ,"_hint" to your private array

Before: 

 

private ["_missName","_coords","_vehicle","_crate","_crash"];

After: 

 

private ["_missName","_coords","_vehicle","_crate","_crash","_hint"];

 

2. Create array and class:

 

 

find:

[nil,nil,rTitleText,"A bandit hunting party has been spotted! Check your map for the location!", "PLAIN",10]

and comment it out (by adding a // before the line)

 

Add 

 

_ARRAYNAMEHERE = ["ITEM1","ITEM2"];
_CLASSNAMEHERE = _ARRAYNAMEHERE call BIS_fnc_selectRandom; 
 
directly above the line you just commented out - so it should look like this: 
 
_ARRAYNAMEHERE = ["ITEM1","ITEM2"];
_CLASSNAMEHERE = _ARRAYNAMEHERE call BIS_fnc_selectRandom; 


//[nil,nil,rTitleText,"A bandit hunting party has been spotted! Check your map for the location!", "PLAIN",10] call RE;
Just below the commented line add: 
 
 
_picture = getText (configFile >> "cfgWeapons" >> _CLASSNAMEHERE >> "picture"); //this will be %1
_hint = parseText format ["
<t size='3'font='Bitstream'align='Center'color='#ff0000'>Bandit Hunting Party</t><br/><br/>
<t align='center'><img size='8' image='%1'/></t><br/>
<t size='1'font='Bitstream'align='Center'color='#ff0000'>A bandit hunting party has been spotted!</t><br/>
<t size='1'font='Bitstream'align='Center'color='#ff0000'>Check your map for the location!</t><br/>",
_picture
];
[nil,nil,rHINT,_hint] call RE;

 

Explanation of the options here: 

 

1: _ARRAYNAMEHERE - this is whatever you want to call your array - can be anything - provided it is not already in use within the file you are using

2: _CLASSNAMEHERE - this is whatever you want to call your class - this will be used to call the array

3: ITEM1, ITEM2 - this is which ever item you want to use  - keep in mind - the item MUST have a .p3d file attached to it. - so for example "huntingrifle" aka CZ550

In the last "Code" box it says the following: 

 

_picture = getText (configFile >> "cfgWeapons" >> _CLASSNAMEHERE >> "picture"); //this will be %1

cfgWeapons - this can be either: cfgWeapons, cfgAmmo, cfgMoves, cfgVehicles and it MUST!!!! correspond to the ITEM1 and ITEM2 in your array. So coming back to the example, "huntingrifle", you cannot put cfgVehicles in there as it is a weapon and not a car.

Now, I am sure there is a MUCH better way of doing this, but for me - this works - if there is a better way - please feel free to edit / create / test / post

I will be sending this to Fuchs to see if he / she will update accordingly and bundle it together with an update.

edit - forgot to mention: 

 

Create a new file called "messages.sqf" and place the following in there: 

 

fnc_remote_message = {
    private ["_type", "_message", "_player"];
    _type = _this select 0;
    _message = _this select 1;
    if (count _this > 2) then {
        _player = _this select 2;
        if (_player == player) then {
            switch (_type) do {
                case "globalChat": {
                    player globalChat _message;
                };
                case "hint": {
                    hint _message;
                };
                case "titleCut": {
                    titleCut [_message, "PLAIN DOWN", 3];
                };
                case "titleText": {
                    titleText [_message, "PLAIN DOWN"]; titleFadeOut 10;
                };
            };
        };
    } else {
        switch (_type) do {
            case "hint": {
                hint _message;
            };
            case "titleCut": {
                titleCut [_message,"Plain Down",3];
            };
            case "titleText": {
                titleText [_message, "PLAIN DOWN"]; titleFadeOut 10;
            };
        };
    };
};

"customRemoteMessage" addPublicVariableEventHandler {(_this select 1) call fnc_remote_message;};

 

Place this file in the root of your mission pbo and call it from your init.sqf by adding: 

 

_nil = [] execVM "messages.sqf"; into your if (isServer) { ... } block

 

This works but it seems to cancel the message that displays when the mission has completed. Im going to try and duplicate this for mission completion.

 

Edit - Yes just duplicate this process at the bottom where the mission ends and it works.

Share this post


Link to post
Share on other sites

Yea sure heres mine, although now Ive installed WICKED ai and can't get it to work on there haha.

EM1

/*
	Medical C-130 Crash by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
	Modified to new format by Vampire
*/

private ["_missName","_coords","_wreck","_trash","_trash1","_trash2","_trash3","_trash4","_trash5","_veh1","_veh2","_vehicle","_vehicle1","_crate","_crate1","_hint"];

//Name of the Mission
_missName = "C130 Crash";

//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;

_DZMSARRAYPICS = ["C130J","C130J_US_EP1"];
_BANDITC130PIC = _DZMSARRAYPICS call BIS_fnc_selectRandom; 

_picture = getText (configFile >> "cfgVehicles" >> _BANDITC130PIC >> "picture"); //this will be %1
_hint = parseText format ["
<t size='2'font='Bitstream'align='Center'color='#c70000'>C130 Crash</t><br/><br/>
<t align='center'><img size='7' image='%1'/></t><br/>
<t size='1'font='Bitstream'align='Center'color='#c70000'>A C130 Carrying Supplies has Crashed!</t><br/>
<t size='1'font='Bitstream'align='Center'color='#c70000'>Check your map for the location!</t><br/>",
_picture
];
[nil,nil,rHINT,_hint] call RE;

//[nil,nil,rTitleText,"A C130 Carrying Supplies has Crashed! Bandits are Securing the Cargo!", "PLAIN",10] call RE;

//DZMSAddMajMarker is a simple script that adds a marker to the location
[_coords,_missname] ExecVM DZMSAddMajMarker;

//We create the mission scenery
_wreck = createVehicle ["C130J",[(_coords select 0) - 8.8681, (_coords select 1) + 15.3554,0],[], 0, "NONE"];
_wreck setDir -30.165445;
[_wreck] call DZMSProtectObj;

//Lets open it up
_wreck animate ["ramp_top",1];
_wreck animate ["ramp_bottom",1];

//And lets keep people out
_wreck setHit ["motor", 1];
_wreck setVariable ["R3F_LOG_disabled",true,true];
_wreck setVariable ["BTC_Cannot_Lift",true,true];
_wreck removeAllEventHandlers "Killed";
_wreck removeAllEventHandlers "HandleDamage";
_wreck setVehicleLock "LOCKED";
_wreck removeAllEventHandlers "GetIn";
_wreck addEventHandler ["GetIn",{
	if (isPlayer (_this select 2)) then {
		(_this select 2) action ["getOut",(_this select 0)]; 
		(_this select 0) setVehicleLock "LOCKED";
		(_this select 0) removeAllEventHandlers "GetIn";
	};
}];

_trash = createVehicle ["Barrels",[(_coords select 0) - 7.4511, (_coords select 1) + 3.8544,0],[], 0, "NONE"];
_trash setDir 61.911976;
[_trash] call DZMSProtectObj;

_trash1 = createVehicle ["Misc_palletsfoiled",[(_coords select 0) + 4.062, (_coords select 1) + 4.7216,0],[], 0, "NONE"];
_trash1 setDir -29.273479;
[_trash1] call DZMSProtectObj;

_trash2 = createVehicle ["Paleta2",[(_coords select 0) - 3.4033, (_coords select 1) - 2.2256,0],[], 0, "NONE"];
[_trash2] call DZMSProtectObj;

_trash3 = createVehicle ["Land_Pneu",[(_coords select 0) + 1.17, (_coords select 1) + 1.249,0],[], 0, "NONE"];
[_trash3] call DZMSProtectObj;

_trash4 = createVehicle ["Land_transport_crates_EP1",[(_coords select 0) + 3.9029, (_coords select 1) - 1.8477,0],[], 0, "NONE"];
_trash4 setDir -70.372086;
[_trash4] call DZMSProtectObj;

_trash5 = createVehicle ["Fort_Crate_wood",[(_coords select 0) - 2.1181, (_coords select 1) + 5.9765,0],[], 0, "NONE"];
_trash5 setDir -28.122475;
[_trash5] call DZMSProtectObj;

//We create the mission vehicles
_veh1 = ["small"] call DZMSGetVeh;
_veh2 = ["small"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) + 14.1426, (_coords select 1) - 0.6202,0],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle [_veh2,[(_coords select 0) - 6.541, (_coords select 1) - 11.5557,0],[], 0, "CAN_COLLIDE"];

//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_vehicle] call DZMSSetupVehicle;
[_vehicle1] call DZMSSetupVehicle;

//DZMSBoxFill fills the box, DZMSProtectObj prevents it from disappearing
_crate = createVehicle ["USVehicleBox",[(_coords select 0) - 1.5547,(_coords select 1) + 2.3486,0],[], 0, "CAN_COLLIDE"];
[_crate,"supply"] ExecVM DZMSBoxSetup;
[_crate] call DZMSProtectObj;

_crate1 = createVehicle ["USLaunchersBox",[(_coords select 0) + 0.3428,(_coords select 1) - 1.8985,0],[], 0, "CAN_COLLIDE"];
[_crate1,"supply"] ExecVM DZMSBoxSetup;
[_crate1] call DZMSProtectObj;

//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[[(_coords select 0) - 10.5005,(_coords select 1) - 2.6465,0],6,3,"DZMSUnitsMajor", true, true] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 4.7027,(_coords select 1) + 12.2138,0],6,3,"DZMSUnitsMajor", true, true] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 2.918,(_coords select 1) - 9.0342,0],6,3,"DZMSUnitsMajor", true, true] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 2.918,(_coords select 1) - 9.0342,0],6,3,"DZMSUnitsMajor", true, true] call DZMSAISpawn;

//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMajor"] call DZMSWaitMissionComp;

//Call DZMSSaveVeh to attempt to save the vehicles to the database
//If saving is off, the script will exit.
[_vehicle] ExecVM DZMSSaveVeh;
[_vehicle1] ExecVM DZMSSaveVeh;

//Let everyone know the mission is over

_DZMSARRAYPICS = ["C130J","C130J_US_EP1"];
_BANDITC130PIC = _DZMSARRAYPICS call BIS_fnc_selectRandom; 

_picture = getText (configFile >> "cfgVehicles" >> _BANDITC130PIC >> "picture"); //this will be %1
_hint = parseText format ["
<t size='2'font='Bitstream'align='Center'color='#78E678'>C130 Crash</t><br/><br/>
<t align='center'><img size='7' image='%1'/></t><br/>
<t size='1'font='Bitstream'align='Center'color='#78E678'>The Crash Site has been Secured by Survivors!</t><br/>",
_picture
];
[nil,nil,rHINT,_hint] call RE;
//[nil,nil,rTitleText,"The Crash Site has been Secured by Survivors!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Major EM1 C130 Mission has Ended."];
deleteMarker "DZMSMajMarker";
deleteMarker "DZMSMajDot";

//Let the timer know the mission is over
DZMSMajDone = true;

Share this post


Link to post
Share on other sites

With Wicked AI its just the same. You put the code in mission_winorfail.sqf like this:

 

 

//[nil,nil,rTitleText,_msgstart,"PLAIN",10] call RE;

 
//_logostart = "scripts\Player_Hud\icons\radar.paa";
//_logostart
//<img size='5' align='center' image='%2'/>
//<br/>
 
_hint = parseText format ["
<t align='center' color='#FFFF00' shadow='2' size='1.75'>MISSION</t>
<br/>
<br/>
<t align='center' color='#ffffff' size='1.10'>%1</t>",
_msgstart
];
customRemoteMessage = ['hint', _hint];
publicVariable "customRemoteMessage";

 

However, everytime I try to add a custom image it loads for the first restart and subsequent restarts I get the error message "cannot load texture". So i just have it text based at the moment.

The _msgstart just takes the info from each mission for start, win, fail and puts it as the format that you set here.

Hope it helps

Share this post


Link to post
Share on other sites

Anyone know how to disable infiSTAR debug while these mission messages are displayed, then bring it back up once the mission message fades?

Yea that would be interesting to find out.. Most people never see the mission cause they have the debug monitor up. Maybe even just change the position?

Share this post


Link to post
Share on other sites

You could just turn off the Infistar debug monitor. That's what I did. I found it annoying to have it displayed all the time.

except people like it and aren't smart enough to know how to turn it off/on even though it tells them how to do it. so when you turn it off they'll bitch about not having it. been there, done that

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...