Skip to content

Flying Damage: ??-HF

Featured Replies

Hi

Make window OnScreenMessageExWnd with 28 textboxes on screen center:
ryGYtK4.png

 

Add it to a new *.uc class with the same name (OnScreenMessageExWnd)

class OnScreenMessageExWnd extends UICommonAPI;

const DAMAGE_MESSAGE_OFFSET = 100;
const MAX_DAMAGE_MESSAGE = 28;

var WindowHandle Me;
var TextBoxHandle DamageText[MAX_DAMAGE_MESSAGE]; 
  	
function OnLoad()
{
	local int i;
	Me = GetWindowHandle("OnScreenMessageExWnd");
	
	for (i=0; i<MAX_DAMAGE_MESSAGE; i++)
	{
		DamageText[i] = GetTextBoxHandle("OnScreenMessageExWnd.DamageText-0-" $ i);
	}
}
	
function OnRegisterEvent()
{
	RegisterEvent( EV_SystemMessage );
}	
	
function OnEvent(int Event_ID, string param)
{
    switch( Event_ID )
	{
   		case EV_SystemMessage:
    		HandleSystemMessage(param);
    	break;			
    }
}

	
function HandleSystemMessage (string a_Param)
{
	local int SystemMsgIndex, DamageToPlayer, i;
  
	ParseInt(a_Param,"Index",SystemMsgIndex);
	switch (SystemMsgIndex)
	{
		case 2261: //player msg
		case 2281: //summoner msg
		for(i=0; i<MAX_DAMAGE_MESSAGE; i++)
		{
			if(DamageText[i].GetText() == "") 
			{
				DamageText[i].SetAlpha(255); 
			  
				ParseInt( a_Param, "Param3", DamageToPlayer); 
			  
				DamageText[i].SetText(string(DamageToPlayer));
				DamageText[i].SetAnchor( "OnScreenMessageExWnd", "BottomCenter", "BottomCenter", -200 + Rand(150), Rand(60) ); 
				DamageText[i].ClearAnchor(); 
				DamageText[i].Move(0, -1500, 8f);   
				DamageText[i].SetAlpha( 0, 2.8f );
				Me.KillTimer(i + DAMAGE_MESSAGE_OFFSET + 1);
				Me.SetTimer(i + DAMAGE_MESSAGE_OFFSET + 1, 2500); 
				break;
			}
		}
		break;
	}
}

function OnTimer (int TimerID)
{
	Me.KillTimer(TimerID);	
	
	if(TimerID >= 101 && TimerID <= 200)
		DamageText[TimerID-DAMAGE_MESSAGE_OFFSET-1].SetText("");
}

 

 

Result:

use.gif

 

Enjoy

 

Edited by api

can you tell us all DamageText Config Foto becuase i made it like you said but nothing.

  • Author
6 hours ago, MegaCheat said:

can you tell us all DamageText Config Foto becuase i made it like you said but nothing.

 

image.png.4f5892ab122640cc9ba421930b9546c6.png

image.png.cca386b1e36a4266656c4c3c129f8d52.png

image.png.ff7e3de98575d07693ed344eac8afcdd.png



Font: https://disk.yandex.ru/d/O36_O7gT1kELFg

 

  • 3 weeks later...

Hi bro. Wat does it meens?

I'm trying to Fer damage received, what param i whould use?

Where can i find params data?

 

ParseInt(a_Param,"Index",
)

Edited by barao45

  • 1 month later...

you need OnLoad() "me"

 

Me = GetHandle( "OnScreenMessageExWnd" );

  • 8 months later...

Could you explain a little better how I install it to put it in a system interlude?

Edited by spring

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.