Jump to content
  • 0

WAI custom mission UI notification


JakeQue

Question

With the default epoch 1061 you have the kill messages on the top left, but I thought it would be nice if we could display the same type of coloured messages in the top middle when a WAI mission is loaded, probably fairly easy to do... if anyone has the code it would be much appreciated

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
49 minutes ago, DuMa said:


Change the X-Coordinate of bis_fnc_dynamictext to safeZoneXAbs+0.45  (approximate) just tamper with 0.45

This is the code in compiles.sqf which decides the location of the death message. 

[(format ["%1<br />%2<br />%3<br />%4",death_1,death_2,death_3,death_4]),(safeZoneX + _offset),safeZoneY,10,0,0,8000] spawn BIS_fnc_dynamicText;

So it would be like

[(format ["%1<br />%2<br />%3<br />%4",death_1,death_2,death_3,death_4]),(safeZoneX + 0.45),safeZoneY,10,0,0,8000] spawn BIS_fnc_dynamicText;

This will make the text to middle of the screen, depends on various factors though like your monitor resolution, interface size.

and you don't need _offset anymore because you are setting text to middle. _offset is used so that kill messages dont cover your vehicle status if you are in a vehicle.

 

Even though this cannot be 100% accurate just tamper with it and you will come to the solution.

 

Thank you so much! I'll give it a whirl

Link to comment
Share on other sites

  • 0
3 hours ago, JakeQue said:

With the default epoch 1061 you have the kill messages on the top left, but I thought it would be nice if we could display the same type of coloured messages in the top middle when a WAI mission is loaded, probably fairly easy to do... if anyone has the code it would be much appreciated

Implying that you didn't just see this on other servers and now you want it yourself...

 

Regardless, you need to add a publicVariableEventHandler client side to be able to broadcast the message to everyone. Then, call the event handler with the messages in the mission system.

Link to comment
Share on other sites

  • 0
5 hours ago, BigEgg said:

Implying that you didn't just see this on other servers and now you want it yourself...

 

Regardless, you need to add a publicVariableEventHandler client side to be able to broadcast the message to everyone. Then, call the event handler with the messages in the mission system.

I actually saw it when I use infistar mass message coloured and it shows at the top also when players vote day and night so I thought it would be good to have that same format regardless of whether there's a radio on the person or not...  

I'll look into it, cheers @BigEgg

Link to comment
Share on other sites

  • 0
Just now, JakeQue said:

I actually saw it when I use infistar mass message coloured and it shows at the top also when players vote day and night so I thought it would be good to have that same format regardless of whether there's a radio on the person or not...  

I'll look into it, cheers @BigEgg

I forgot about infistar. You could actually just use it. 

 

Example:

fnc_show_colorAdminMsg = ["A mission has spawned!", "#FFFFFF"];
publicVariable "fnc_show_colorAdminMsg";

 

Infistar already has the event handler, so that should work a lot easier. First parameter is the message, second is the color.

Link to comment
Share on other sites

  • 0
1 minute ago, BigEgg said:

I forgot about infistar. You could actually just use it. 

 

Example:


fnc_show_colorAdminMsg = ["A mission has spawned!", "#FFFFFF"];
publicVariable "fnc_show_colorAdminMsg";

 

Infistar already has the event handler, so that should work a lot easier. First parameter is the message, second is the color.

I was thinking about using it, but infistar's files are rather large to troll through and I was getting confused after line 100. Thanks for your help mate!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...