How can i implement this?

How can i implement this?

« posted: Oct 25, 2016, 11:55 AM »
Ok after playing an altis server i came across this. Has anyone any idea how to get the missions to display in the middle instead of top right with a black square.


This 1 seems transparent and has a nice fade out. Any Info would be gratefully Revived
Thanks In Advance  heres the pic


http://i.imgur.com/YPdRuLB.jpg
How can i implement this?

How can i implement this 

Re: How can i implement this?

« Reply #1 posted: Oct 25, 2016, 12:24 PM »
I might not know enough about the builtin SQF commands to give you the best solution, but I will give it a try.

Assuming the hint command can't be overloaded to customize positioning/style like this, and there are no other similar functions for broadcasting to client...

I would probably look at using a custom GUI similar to the player hud. Ideally you would just have one configured that you show/hide, and change the image/text depending on the mission.

Re: How can i implement this?

« Reply #2 posted: Oct 25, 2016, 12:32 PM »
thanks for the speedy reply. I have the pbo from this server but i cant for the life of me find any reference to the mission display, Where would be the best place to look in the pbo ?

Re: How can i implement this?

« Reply #3 posted: Oct 25, 2016, 02:01 PM »
thanks for the speedy reply. I have the pbo from this server but i cant for the life of me find any reference to the mission display, Where would be the best place to look in the pbo ?

I wouldn't really know for sure, they could have put it wherever they wanted. If they continued using the same directory structure I believe there is a client\functions\servermessage.sqf. This displays the standard looking hint message. It would have probably been easier for these devs to update this sqf file, or change the reference in the missions to a new function that takes the same parameters.

My suggestions for now would be...
1. Use Notepad++ and search extra for keywords used in the mission popup like 'Main Objective'
2. Ask the server owner.

Which server is it? If I have some time later today I will look. No promises though.

Re: How can i implement this?

« Reply #4 posted: Oct 25, 2016, 02:44 PM »
Quote
If they continued using the same directory structure I believe there is a client\functions\servermessage.sqf. This displays the standard looking hint message.

U're right. Besides this edit ..

Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
//@file Version: 1.0
//@file Name: init.sqf
//@file Author: [404] Deadbeat
//@file Created: 20/11/2012 05:19
diag_log format["Message %1",messageSystem];

_hint = messageSystem;
hint parseText _hint;

to

Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
//@file Version: 1.0
//@file Name: init.sqf
//@file Author: [404] Deadbeat / edited by LouD
//@file Created: 20/11/2012 05:19
diag_log format["Message %1",messageSystem];

_hint = messageSystem;
//hint _hint;

[
_hint,
[
0,
safeZoneY,
1,
1
],
[10,10],
4,
1,
0
] spawn BIS_fnc_textTiles;


I also checked missionController.sqf and missionHint.sqf and edited them to ..

Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Name: missionController.sqf
// @file Author: AgentRev

if (!isServer) exitWith {};

private ["_controllerNum", "_tempController", "_controllerSuffix", "_missionsFolder", "_missionDelay", "_availableMissions", "_missionsList", "_nextMission"];

_controllerNum = param [0, 1, [0]];
_tempController = param [1, false, [false]];
_controllerSuffix = "";

if (_controllerNum > 1) then
{
_controllerSuffix = format [" %1", _controllerNum];
};

diag_log format ["WASTELAND SERVER - Started %1 Mission%2 Controller", MISSION_CTRL_TYPE_NAME, _controllerSuffix];

_missionsFolder = MISSION_CTRL_FOLDER;
[MISSION_CTRL_PVAR_LIST, MISSION_CTRL_FOLDER] call attemptCompileMissions;

_missionDelay = MISSION_CTRL_DELAY;

while {true} do
{
_nextMission = nil;

while {isNil "_nextMission"} do
{
_availableMissions = [MISSION_CTRL_PVAR_LIST, { !(_x select 2) }] call BIS_fnc_conditionalSelect;
// _availableMissions = MISSION_CTRL_PVAR_LIST; // If you want to allow multiple missions of the same type running along, uncomment this line and comment the one above

if (count _availableMissions > 0) then
{
_missionsList = _availableMissions call generateMissionWeights;
_nextMission = _missionsList call fn_selectRandomWeighted;
}
else
{
uiSleep 60;
};
};

[MISSION_CTRL_PVAR_LIST, _nextMission, true] call setMissionState;

diag_log format ["WASTELAND SERVER - %1 Mission%2 waiting to run: %3", MISSION_CTRL_TYPE_NAME, _controllerSuffix, _nextMission];

[
parseText format
[
"<t align='center' color='%1' shadow='2' size='1.75'>%2 Objective%3</t><br/>" +
"<t align='center' color='%1'>------------------------------</t><br/>" +
"<t align='center' color='%4' size='1.0'>Starting in %5 minutes</t>",
MISSION_CTRL_COLOR_DEFINE,
MISSION_CTRL_TYPE_NAME,
_controllerSuffix,
subTextColor,
_missionDelay / 60
]
] call hintBroadcast;

uiSleep _missionDelay;

// these should be defined in the mission script
private ["_setupVars", "_setupObjects", "_waitUntilMarkerPos", "_waitUntilExec", "_waitUntilCondition", "_waitUntilSuccessCondition", "_ignoreAiDeaths", "_failedExec", "_successExec"];

[_controllerSuffix] call compile preprocessFileLineNumbers format ["server\missions\%1\%2.sqf", MISSION_CTRL_FOLDER, _nextMission];

[MISSION_CTRL_PVAR_LIST, _nextMission, false] call setMissionState;

if (_tempController) exitWith {};
uiSleep 5;
};

and

Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Version: 1.0
// @file Name: missionHint.sqf
// @file Author: AgentRev
// @file Created: 09/01/2014 20:30

private ["_title", "_subTitle", "_picture", "_text", "_titleColor"];

_title = param [0, "?"];
_subtitle = param [1, ""];
_picture = param [2, "", [""]];
_text = param [3, ""];
_titleColor = param [4, "", [""]];

[
parseText format
[
"<t color='%5' shadow='2' size='1.75' align='center'>%1</t><br/>" +
"<t color='%5' align='center'>--------------------------------</t><br/>" +
(if (_subtitle != "") then { "<t size='1.25' align='center'>%2</t><br/>" } else { "" }) +
(if (_picture != "") then { "<img size='5' align='center' image='%3'/><br/>" } else { "" }) +
"<t align ='center'>%4</t>",
_title,
_subtitle,
_picture,
_text,
_titleColor
]
] call hintBroadcast;

Tested some time, before I got it. Hopefully I didn't forget sth now.

Re: How can i implement this?

« Reply #5 posted: Oct 25, 2016, 02:52 PM »
thanks again Griffin :P i will try it out later and thanks to Centrifugal for pointing in the right direction

Re: How can i implement this?

« Reply #6 posted: Oct 25, 2016, 03:16 PM »
Great teamwork Guys. I will be adding this to mine for sure!

Morgue!

Re: How can i implement this?

« Reply #7 posted: Oct 25, 2016, 04:12 PM »
Hm. Now I'm not sure.

Is this here ..



.. placed ALL THE TIME, when playing? Actually, it disappears after few seconds and appears, when changing weapon or reloading.

*headscratch

Or is it usual?  :o

EDIT: yes, usually, it's shown all the time. Also with the standing position of the soldier. Actually the position isn't shown and .. it disappears after seconds.

Re: How can i implement this?

« Reply #8 posted: Oct 25, 2016, 04:17 PM »
yes it is always there


http://i.imgur.com/hGsMiDE.jpg
How can i implement this?

Re: How can i implement this?

« Reply #9 posted: Oct 25, 2016, 04:25 PM »
Maybe I f**ked up sth else. Hm.  :-\
Or is this display server side? Tested on local ..

EDIT²: yes. Server side. It's working.  ;D

Re: How can i implement this?

« Reply #10 posted: Oct 25, 2016, 07:06 PM »
so,come on show us what the mission hint looks like now ?  8)

Re: How can i implement this?

« Reply #11 posted: Oct 25, 2016, 07:08 PM »
Check in, m8

https://img5.picload.org/image/rdcgwwlc/myticket.jpg
How can i implement this?

 8)

Re: How can i implement this?

« Reply #12 posted: Sep 22, 2017, 10:30 PM »
How do you get these messages displayed for a longer time?
On my server they disappear too fast.

Re: How can i implement this?

« Reply #13 posted: Yesterday at 08:15 AM »
Sorry, I have no idea. Worked well, when we had it ..  :-\