EC: void pool wall damage notification


It's easy to miss the notification the void pool walls are being damaged in the heat of battle.

This edit uses center screen text notification to make that more obvious.

textparsing.lua, function TextParsing.CenterScreenText(), add this, below the handling of 1152527

	if ( SystemData.TextID == 1152529 ) then	-- the void pool walls have been damaged! defend the void pool!
CenterScreenText.SendCenterScreenTexture("voidpool")
return
end

centerscreentext.lua, function CenterScreenText.SendCenterScreenTexture(),


if ( message == "voidpool" ) then
local windowName = "CenterScreenText_VoidPool" -- separate window for generic text

if(DoesWindowNameExist(windowName) == false) then

CreateWindowFromTemplate(windowName, "DamageWindow", "ResizeWindow")

-- reset relative position from template
WindowClearAnchors(windowName)

LabelSetText(windowName.."Text", GetStringFromTid(1152531)) -- "The Void Pool"
WindowSetScale(windowName.."Text", 3.5)

LabelSetFont(windowName.."Text", "UO_NeueText", WindowUtils.FONT_DEFAULT_TEXT_LINESPACING) -- height 20 for enu locale

-- reset the dimensions/offsets from the template
WindowSetDimensions( windowName, 0, 0 )
WindowSetDimensions( windowName.."Text", 0, 0 )

WindowAddAnchor(windowName, "center", "ResizeWindow", "center", 0, -310) -- offset above existing centertext, as both can be active.
end

LabelSetTextColor(windowName .."Text", 255, 0, 0) -- {r=255, g=0, b=0} -- red.

WindowStopAlphaAnimation(windowName)
WindowSetAlpha(windowName, 0)
WindowStartAlphaAnimation(windowName, Window.AnimationType.LOOP, 0.5, 1, 1, false, 0, 5) -- increased duration of 5 seconds over standard centerscreentext.

PlaySound(1, 814, WindowData.PlayerLocation.x,WindowData.PlayerLocation.y,WindowData.PlayerLocation.z) -- scream sound

return
end


Sign In or Register to comment.