Ricardo Posted May 22, 2014 Author Report Share Posted May 22, 2014 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 :( Link to comment Share on other sites More sharing options...
Darihon Posted May 22, 2014 Report Share Posted May 22, 2014 Oh, my bad! I will see if I can get something to work later today. I will reply once I have found something Link to comment Share on other sites More sharing options...
Ricardo Posted May 25, 2014 Author Report Share Posted May 25, 2014 Oh, my bad! I will see if I can get something to work later today. I will reply once I have found something Any luck so far? Link to comment Share on other sites More sharing options...
Darihon Posted May 25, 2014 Report Share Posted May 25, 2014 No, not yet, lack of time at the moment. I'll see if I can get any update on this today or tomorrow. Link to comment Share on other sites More sharing options...
Ricardo Posted May 25, 2014 Author Report Share Posted May 25, 2014 Alright mate, no rushes! Thanks ;) Link to comment Share on other sites More sharing options...
stonXer Posted July 16, 2014 Report Share Posted July 16, 2014 any news on this? :) Link to comment Share on other sites More sharing options...
KingRaymond795 Posted December 2, 2014 Report Share Posted December 2, 2014 This gone dead? anyone get it working? Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted December 2, 2014 Report Share Posted December 2, 2014 Glad this thread was bumped up. Would love to see this working. Link to comment Share on other sites More sharing options...
KingRaymond795 Posted December 3, 2014 Report Share Posted December 3, 2014 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 Link to comment Share on other sites More sharing options...
TheVampire Posted December 4, 2014 Report Share Posted December 4, 2014 This was something I had planned to work on before but never got around to. The way I was going to do this is change the titleText into a call to a function that would pass the mission name and image and such to the hint. Link to comment Share on other sites More sharing options...
KingRaymond795 Posted December 4, 2014 Report Share Posted December 4, 2014 TheVampire - that sounds like an idea - except, I doubt I would be able develop this. I am still new to developing SQF :/ Link to comment Share on other sites More sharing options...
copper Posted January 29, 2015 Report Share Posted January 29, 2015 _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. Link to comment Share on other sites More sharing options...
TheVampire Posted January 29, 2015 Report Share Posted January 29, 2015 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. Link to comment Share on other sites More sharing options...
copper Posted January 29, 2015 Report Share Posted January 29, 2015 Sorry! As it was related to the Hint-message post from above I did post it here. Didnt mean to disturb anybodies thread. Link to comment Share on other sites More sharing options...
DangerRuss Posted January 29, 2015 Report Share Posted January 29, 2015 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. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted March 2, 2015 Report Share Posted March 2, 2015 Could you guys attach one of your missions with the Hint box added to it (KingRaymond and DangerRuss' code added in)? It might help me grasp the concept a little better. Link to comment Share on other sites More sharing options...
DangerRuss Posted March 2, 2015 Report Share Posted March 2, 2015 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; MG-Maximus 1 Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted March 2, 2015 Report Share Posted March 2, 2015 Cool, thank you DangerRuss. Link to comment Share on other sites More sharing options...
DangerRuss Posted March 2, 2015 Report Share Posted March 2, 2015 Cool, thank you DangerRuss. no prob make sure you add it both at the top and the bottom otherwise you won't receive any message when the mission has ended. If you ever find a way to do this with WICKED AI let me know. Link to comment Share on other sites More sharing options...
MG-Maximus Posted March 12, 2015 Report Share Posted March 12, 2015 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 Link to comment Share on other sites More sharing options...
ElDubya Posted March 13, 2015 Report Share Posted March 13, 2015 Anyone know how to disable infiSTAR debug while these mission messages are displayed, then bring it back up once the mission message fades? Link to comment Share on other sites More sharing options...
MG-Maximus Posted March 14, 2015 Report Share Posted March 14, 2015 I think here is what you might be looking for ElDubya: We dont have a debug as we implement the stats into the hud but another option would be to have the debug monitor to fade out? Link to comment Share on other sites More sharing options...
DangerRuss Posted March 14, 2015 Report Share Posted March 14, 2015 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? Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted March 14, 2015 Report Share Posted March 14, 2015 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. Link to comment Share on other sites More sharing options...
DangerRuss Posted March 14, 2015 Report Share Posted March 14, 2015 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now