Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Fallen Empire: Legions
- Copyright (C) GarageGames.com, Inc.
- */
- function Message::initialize( )
- {
- addMessageCallback("", defaultMessageCallback);
- }
- function Message::deinitialize( )
- {
- deleteVariables("$MessageCallback*");
- }
- function clientCmdServerMessage( %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13 )
- {
- %msgType = detag(%msgType);
- for (%i = 0; (%func = $MessageCallback["", %i]) !$= ""; %i++)
- call(%func, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13);
- for (%i = 0; (%func = $MessageCallback[%msgType, %i]) !$= ""; %i++)
- call(%func, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13);
- }
- function addMessageCallback( %msgType, %function )
- {
- for (%i = 0; (%func = $MessageCallback[%msgType, %i]) !$= ""; %i++)
- {
- if (%func $= %function)
- return;
- }
- $MessageCallback[%msgType, %i] = %function;
- }
- function defaultMessageCallback( %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9 )
- {
- if (%msgString $= "")
- return;
- %message = detag(%msgString);
- %tag = getSubStr(%message, 0, 2);
- %message = getSubStr(%message, 2, 1000);
- %message = replaceTeamStrings(%message);
- switch$ (%tag)
- {
- case "~c":
- if (%message !$= "")
- AddChatMessage(%message);
- case "~g":
- if (%message !$= "")
- AddGameMessage(%message);
- case "~s":
- if (%message !$= "")
- {
- sfxPlayOnce(AudioChat, %message);
- }
- }
- }
- addMessageCallback("QuickChatMessage", handleMsgQuickChat);
- function handleMsgQuickChat( %msgType, %taggedOutput, %sender, %taggedMessage, %taggedVoice, %taggedSound) {
- %voiceId = detag(%taggedVoice);
- %sound = detag(%taggedSound);
- // play sounds based on settings
- if($Pref::Player::QuickChatSoundSetting == 1
- || ($Pref::Player::QuickChatSoundSetting == 2 && %teamOnly))
- {
- QuickChatManager.playMessageVoice(%sender, %voiceId, %sound);
- }
- }
- addMessageCallback("MsgGameStart", handleMsgGameStart);
- function handleMsgGameStart( %msgType )
- {
- sfxPlayOnce(CtfGameStartEnd);
- }
- addMessageCallback("MsgPlayerKilled", handleMsgPlayerKilled);
- function handleMsgPlayerKilled( %msgType )
- {
- $PlayerGotFlag = false;
- $PlayerIsAlive = false;
- stopOverdriveRinging();
- if ($spawnSelectEnabled)
- SpawnSelect.open();
- }
- addMessageCallback("MsgPracticeStart", handleMsgPracticeStart);
- function handleMsgPracticeStart( %msgType )
- {
- clientCmdCenterPrint("\c4The Game Will Begin When There Are Enough Players", -1);
- }
- addMessageCallback("MsgPracticeEnd", handleMsgEndPractice);
- function handleMsgEndPractice( %msgType )
- {
- clientCmdCenterPrint("", -1);
- }
- addMessageCallback("MsgTimeRemaining", handleMsgTimeRemaining);
- function handleMsgTimeRemaining( %msgType, %msgString, %timeLeftMs, %timeLeft, %unit, %mode )
- {
- HudOverlay.setClockTimeRemaining(%timeLeftMs, %mode);
- if (%timeLeft $= "" || %unit $= "")
- return;
- %message = "";
- switch$ (%mode)
- {
- case "Pregame":
- %message = "Game Starts In "@%timeLeft SPC %unit;
- case "Game":
- %message = "Game Ends In "@%timeLeft SPC %unit;
- case "Overtime":
- %message = "Overtime Ends In "@%timeLeft SPC %unit;
- default:
- return;
- }
- sfxPlayOnce(CtfLowTimeWarning);
- clientCmdTopPrint(%message, 2000, 1);
- }
- function clientCmdReconnect()
- {
- if(Serverconnection.getIP() !$= "127.0.0.1" && $Pref::Demos::Reconnect == 1)
- {
- schedule(1500,0,"reconnectLast");
- }
- }
- function reconnectLast()
- {
- if(Client::leaveServer())
- client::joinserver($ServerInfo::Address);
- //gameconnection.connect($lastAddress);
- }
- addMessageCallback("MsgEnableRespawn", handleMsgEnableRespawn);
- function handleMsgEnableRespawn( %msgType )
- {
- clientCmdBottomPrint("Press FIRE to respawn", 2000, 1);
- }
- addMessageCallback("MsgRespawned", handleMsgRespawned);
- function handleMsgRespawned( %msgType )
- {
- clientCmdBottomPrint("", 0, 1);
- $PlayerIsAlive = true;
- $PlayerGotFlag = false;
- }
- addMessageCallback("MsgAnnounceTeamWinner", handleMsgAnnounceTeamWinner);
- function handleMsgAnnounceTeamWinner( %msgType, %msgString, %team0, %score0, %team1, %score1 )
- {
- %winner = "";
- %winnerScore = 0;
- %loserScore = 0;
- sfxPlayOnce(CtfGameStartEnd);
- if (%score0 == %score1)
- {
- clientCmdTopPrint("Game Ended In A Tie At "@%score0, 2000);
- }
- else
- {
- if (%score0 > %score1)
- {
- %winner = %team0;
- %winnerScore = %score0;
- %loserScore = %score1;
- }
- else
- {
- %winner = %team1;
- %winnerScore = %score1;
- %loserScore = %score0;
- }
- clientCmdCenterPrint(%winner SPC "Won" SPC %winnerScore SPC "To" SPC %loserScore, -1);
- }
- }
- addMessageCallback("MsgCtfOdGrab", handleMsgCtfOdGrab);
- function handleMsgCtfOdGrab( %msgType, %msgString, %team, %client, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- if (%flagTeam == $CurrentTeam)
- sfxPlayOnce(CtfFriendlyFlagTakenSound);
- else
- sfxPlayonce(CtfEnemyFlagTakenSound);
- clientCmdTopPrint(%team@" Flag Was \cp\c5\OD Grabbed\co By "@%client, 2000, 1);
- }
- addMessageCallback("MsgCtfLlamaGrab", handleMsgCtfLlamaGrab);
- function handleMsgCtfLlamaGrab( %msgType, %msgString, %team, %client, %speed, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- if (%flagTeam == $CurrentTeam)
- sfxPlayOnce(CtfFriendlyFlagTakenSound);
- else
- sfxPlayonce(CtfEnemyFlagTakenSound);
- clientCmdTopPrint(%team@" Flag Was \cp\c5\Llama'd\co By "@%client, 2000, 1);
- }
- addMessageCallback("MsgCtfFlagGrab", handleMsgCtfFlagGrab);
- function handleMsgCtfFlagGrab( %msgType, %msgString, %team, %client, %speed, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- if (%flagTeam == $CurrentTeam)
- sfxPlayOnce(CtfFriendlyFlagTakenSound);
- else
- sfxPlayonce(CtfEnemyFlagTakenSound);
- clientCmdTopPrint(%team@" Flag Was \cp\c5\Grabbed\co By "@%client, 2000, 1);
- }
- addMessageCallback("MsgCtfFlagCatch", handleMsgCtfFlagCatch);
- function handleMsgCtfFlagCatch( %msgType, %msgString, %team, %client, %speed, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- if (%flagTeam == $CurrentTeam)
- sfxPlayOnce(CtfFriendlyFlagTakenSound);
- else
- sfxPlayonce(CtfEnemyFlagTakenSound);
- clientCmdTopPrint(%team@" Flag Was \cp\c5\Caught\co By "@%client, 2000, 1);
- }
- addMessageCallback("MsgCtfFlagPickup", handleMsgCtfFlagPickup);
- function handleMsgCtfFlagPickup( %msgType, %msgString, %team, %client, %speed, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- if (%flagTeam == $CurrentTeam)
- sfxPlayOnce(CtfFriendlyFlagTakenSound);
- else
- sfxPlayonce(CtfEnemyFlagTakenSound);
- clientCmdTopPrint(%team@" Flag Was \cp\c5\Picked Up\co By "@%client, 2000, 1);
- }
- addMessageCallback("MsgCtfFlagThrow", handleMsgCtfFlagThrow);
- function handleMsgCtfFlagThrow( %msgType, %msgString, %team, %client, %held, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- clientCmdTopPrint(%team@" Flag Was \cp\c5\Thrown\co By "@%client, 2000, 1);
- }
- addMessageCallback("MsgCtfFlagDrop", handleMsgCtfFlagDrop);
- function handleMsgCtfFlagDrop( %msgType, %msgString, %team, %client, %held, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- clientCmdTopPrint(%team@" Flag Was \cp\c5\Dropped\co By "@%client, 2000, 1);
- }
- addMessageCallback("MsgCtfFlagReturn", handleMsgCtfFlagReturn);
- function handleMsgCtfFlagReturn( %msgType, %msgString, %team, %client, %speed, %height, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- sfxPlayOnce(CtfFlagReturnedSound);
- if (%client !$= "0")
- clientCmdTopPrint(%team@" Flag Was \cp\c5\Returned\co By "@%client, 2000, 1);
- else
- clientCmdTopPrint(%team@" Flag Was Returned", 2000, 1);
- }
- addMessageCallback("MsgCtfFlagCap", handleMsgCtfFlagCap);
- function handleMsgCtfFlagCap( %msgType, %msgString, %team, %client, %held, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- sfxPlayOnce(CtfFlagCaptureSound);
- clientCmdTopPrint(%team@" Flag Was \cp\c5\Captured\co By "@%client, 2000, 1);
- }
- /***********
- * RABBIT *
- ***********/
- addMessageCallback("MsgRabbitFlagGrab", handleMsgRabbitFlagGrab);
- function handleMsgRabbitFlagGrab( %msgType, %msgString, %client, %speed, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- sfxPlayOnce(CtfFlagTakenSound);
- clientCmdTopPrint("The Flag Was \cp\c5\Grabbed\co By "@%client, 2000, 1);
- }
- addMessageCallback("MsgRabbitFlagCatch", handleMsgRabbitFlagCatch);
- function handleMsgRabbitFlagPickup( %msgType, %msgString, %client, %speed, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- sfxPlayOnce(CtfFlagTakenSound);
- clientCmdTopPrint("The Flag Was \cp\c5\Caught\co By "@%client, 2000, 1);
- }
- addMessageCallback("MsgRabbitFlagPickup", handleMsgRabbitFlagPickup);
- function handleMsgRabbitFlagPickup( %msgType, %msgString, %client, %speed, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- sfxPlayOnce(CtfFlagTakenSound);
- clientCmdTopPrint("The Flag Was \cp\c5\Picked Up\co By "@%client, 2000, 1);
- }
- addMessageCallback("MsgRabbitFlagThrow", handleMsgRabbitFlagThrow);
- function handleMsgRabbitFlagThrow( %msgType, %msgString, %client, %held, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- clientCmdTopPrint("The Flag Was \cp\c5\Thrown\co By "@%client, 2000, 1);
- }
- addMessageCallback("MsgRabbitFlagDrop", handleMsgRabbitFlagDrop);
- function handleMsgRabbitFlagDrop( %msgType, %msgString, %client, %held, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- clientCmdTopPrint("The Flag Was \cp\c5\Dropped\co By "@%client, 2000, 1);
- }
- addMessageCallback("MsgRabbitFlagReturn", handleMsgRabbitFlagReturn);
- function handleMsgRabbitFlagReturn( %msgType, %msgString, %client, %speed, %height, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- sfxPlayOnce(CtfFlagReturnedSound);
- if (%client !$= "0")
- clientCmdTopPrint("The Flag Was \cp\c5\Returned\co", 2000, 1);
- else
- clientCmdTopPrint("The Flag Was Returned", 2000, 1);
- }
- addMessageCallback("MsgRabbitFlagScore", handleMsgRabbitFlagScore);
- function handleMsgRabbitFlagScore( %msgType, %msgString, %client, %score )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- sfxPlayOnce(CtfFlagCaptureSound);
- clientCmdTopPrint(%client@" Has \cp\c5\A Score Of\co "@%score, 2000, 1);
- }
- /************
- * HUNTERS *
- ************/
- addMessageCallback("MsgAnnounceHuntersWinner", handleMsgAnnounceHuntersWinner);
- function handleMsgAnnounceHuntersWinner(%msgType, %msgString, %clientName, %score)
- {
- sfxPlayOnce(CtfGameStartEnd);
- %clientName = replaceTeamStrings(detag(%clientName));
- clientCmdCenterPrint(%clientName SPC "Won With" SPC %score SPC "Points", -1);
- }
- function nexusRadiationWarning()
- {
- echo("nexusRadiationWarning");
- clientCmdBottomPrint("\cp\c2\DANGER: EXTREME RADIATION EXPOSURE\co", 500);
- $Hunters::NexusRadiationWarningSchedule = schedule(1000, 0, nexusRadiationWarning);
- }
- addMessageCallback("HuntersStartNexusRadiationWarning", handleHuntersStartNexusRadiationWarning);
- function handleHuntersStartNexusRadiationWarning(%msgType, %msgString)
- {
- echo("handleHuntersStartNexusRadiationWarning");
- if (isEventPending($Hunters::NexusRadiationWarningSchedule))
- cancel($Hunters::NexusRadiationWarningSchedule);
- nexusRadiationWarning();
- }
- addMessageCallback("HuntersStopNexusRadiationWarning", handleHuntersStopNexusRadiationWarning);
- function handleHuntersStopNexusRadiationWarning(%msgType, %msgString)
- {
- echo("handleHuntersStopNexusRadiationWarning");
- if (isEventPending($Hunters::NexusRadiationWarningSchedule))
- cancel($Hunters::NexusRadiationWarningSchedule);
- clientCmdBottomPrint("", -1);
- }
- /************
- * CNC/FCNC *
- ************/
- addMessageCallback("MsgPointCaptured", handleMsgPointCaptured);
- function handleMsgPointCaptured( %msgType, %msgString, %team, %client, %held, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- sfxPlayOnce(CtfFlagCaptureSound);
- clientCmdTopPrint(" Point Was \cp\c5\Captured\co By "@%team, 2000, 1);
- }
- addMessageCallback("MsgPointCaptureable", handleMsgPointCaptureable);
- function handleMsgPointCaptureable( %msgType, %msgString, %team, %client, %held, %flagTeam )
- {
- %client = replaceTeamStrings(detag(%client));
- %team = replaceTeamStrings(detag(%team));
- sfxPlayOnce(CtfFlagCaptureSound);
- clientCmdTopPrint(%team SPC "main base is now captureable", 2000, 1);
- }
- /**************
- * TEAMRABBIT *
- **************/
- addMessageCallback("MsgTRabbitFlagCatch", handleMsgTRabbitFlagCatch);
- function handleMsgTRabbitFlagCatch( %msgType, %msgString, %catcherClient, %passString, %passerClient )
- {
- %catcherClient = replaceTeamStrings(detag(%catcherClient));
- %passerClient = replaceTeamStrings(detag(%passerClient));
- sfxPlayOnce(CtfFlagTakenSound);
- clientCmdCenterPrint(%catcherClient SPC "\c0caught a \c5" SPC %passString SPC "\c0from" SPC %passerClient, 3000, 1);
- }
- addMessageCallback("MsgTRabbitFlagIntercept", handleMsgTRabbitFlagIntercept);
- function handleMsgTRabbitFlagIntercept( %msgType, %msgString, %catcherClient, %passString, %passerClient )
- {
- %catcherClient = replaceTeamStrings(detag(%catcherClient));
- %passerClient = replaceTeamStrings(detag(%passerClient));
- sfxPlayOnce(CtfFlagTakenSound);
- clientCmdCenterPrint(%catcherClient SPC "\c0intercepted a \c5" SPC %passString SPC "\c0from" SPC %passerClient, 3000, 1);
- }
- /************
- * SPAWNING *
- ************/
- addMessageCallback("setSpawnSelectEnabled", handlesetSpawnSelectEnabled);
- function handlesetSpawnSelectEnabled( %msgType, %msgString, %spawnEnabled)
- {
- $spawnSelectEnabled = %spawnEnabled;
- }
- function AddChatMessage(%message)
- {
- if(isObject($ChatReceiver) && isMethod($ChatReceiver.getClassName(), "addChatDisplayMessage"))
- {
- $ChatReceiver.addChatDisplayMessage($HudElement::CustomChatInterface, ChatTextProfile, %message, $ChatMessageGroup);
- if($Pref::Player::ChatDisplayChatMessages)
- sfxPlayOnce(ChatMessageRecievedSound);
- }
- }
- function AddGameMessage(%message)
- {
- if(isObject($ChatReceiver) && isMethod($ChatReceiver.getClassName(), "addChatDisplayMessage"))
- {
- $ChatReceiver.addChatDisplayMessage($HudElement::CustomChatInterface, GameTextProfile, %message, $GameMessageGroup);
- if($Pref::Player::ChatDisplayChatMessages)
- sfxPlayOnce(ChatMessageRecievedSound);
- }
- }
- function clientCmdTopPrint( %message, %time, %lines )
- {
- %message = replaceTeamStrings(detag(%message));
- SetTopMessage(%message);
- if (!$TopPrintActive)
- FadeInTopMessage();
- else
- cancel($TopPrintClearSchedule);
- if (%time != -1)
- $TopPrintClearSchedule = schedule(%time, 0, FadeOutTopMessage);
- }
- function clientCmdCenterPrint( %message, %time, %lines )
- {
- %message = replaceTeamStrings(detag(%message));
- SetCenterMessage(%message);
- if (!$CenterPrintActive)
- FadeInCenterMessage();
- else
- cancel($CenterPrintClearSchedule);
- if (%time != -1)
- $CenterPrintClearSchedule = schedule(%time, 0, FadeOutCenterMessage);
- }
- function clientCmdBottomPrint( %message, %time, %lines )
- {
- %message = replaceTeamStrings(detag(%message));
- SetBottomMessage(%message);
- if (!$BottomPrintActive)
- FadeInBottomMessage();
- else
- cancel($BottomPrintClearSchedule);
- if (%time != -1)
- $BottomPrintClearSchedule = schedule(%time, 0, FadeOutBottomMessage);
- }
- function clientCmdDescriptionPrint( %message, %time, %text2 )
- {
- %message = replaceTeamStrings(detag(%message));
- SetDescriptionMessage(%message);
- if (!$DescriptionPrintActive)
- FadeInDescriptionMessage();
- else
- cancel($DescriptionPrintClearSchedule);
- if (%time != -1)
- $DescriptionPrintClearSchedule = schedule(%time, 0, FadeOutDescriptionMessage);
- //if(%text2 != 0)
- %message2 = replaceTeamStrings(detag(%text2));
- SetDescriptionLine2Message(%message2);
- if (!$DescriptionLine2PrintActive)
- FadeInDescriptionLine2Message();
- else
- cancel($DescriptionLine2PrintClearSchedule);
- if (%time != -1)
- $DescriptionLine2PrintClearSchedule = schedule(%time, 0, FadeOutDescriptionLine2Message);
- }
- function SetTopMessage( %text )
- {
- HudOverlay.setHudElementText($HudElement::TopMessageText, %text, ImportantMessageProfile, true);
- }
- function FadeInTopMessage( )
- {
- $TopPrintActive = true;
- HudOverlay.AnimateHudElementAlpha($HudElement::TopMessageText, 255, 0.2);
- }
- function FadeOutTopMessage( )
- {
- $TopPrintActive = false;
- HudOverlay.AnimateHudElementAlpha($HudElement::TopMessageText, 0, 0.5);
- }
- function SetCenterMessage( %text )
- {
- HudOverlay.setHudElementText($HudElement::CenterMessageText, %text, ImportantMessageProfile, true);
- }
- function FadeInCenterMessage( )
- {
- $CenterPrintActive = true;
- HudOverlay.AnimateHudElementAlpha($HudElement::CenterMessageText, 255, 0.2);
- }
- function FadeOutCenterMessage( )
- {
- $CenterPrintActive = false;
- HudOverlay.AnimateHudElementAlpha($HudElement::CenterMessageText, 0, 0.5);
- }
- function SetBottomMessage( %text )
- {
- HudOverlay.setHudElementText($HudElement::BottomMessageText, %text, ImportantMessageProfile, true);
- }
- function SetDescriptionMessage( %text )
- {
- HudOverlay.setHudElementText($HudElement::DescriptionMessageText, %text, ImportantMessageProfile, true);
- }
- function SetDescriptionLine2Message( %text )
- {
- HudOverlay.setHudElementText($HudElement::DescriptionLine2MessageText, %text2, ImportantMessageProfile, true);
- }
- function FadeInBottomMessage( )
- {
- $BottomPrintActive = true;
- HudOverlay.AnimateHudElementAlpha($HudElement::BottomMessageText, 255, 0.2);
- }
- function FadeOutBottomMessage( )
- {
- $BottomPrintActive = false;
- HudOverlay.AnimateHudElementAlpha($HudElement::BottomMessageText, 0, 0.5);
- }
- //cores tint effect
- function clientCmdCoreEffectsGogo(%freq,%core)
- {
- switch$ (%core)
- {
- case "Regen":
- HudOverlay.setHudElementTexture($HudOverlay::coresTintOverlay,"client/gui/images/hud/coresOverlay/greenOverlay");
- case "Shield":
- HudOverlay.setHudElementTexture($HudOverlay::coresTintOverlay,"client/gui/images/hud/coresOverlay/blueOverlay");
- }
- HudOverlay.setHudElementBaseTextureSize($HudOverlay::coresTintOverlay, 2000, 2000);
- $coreTintOn = true;
- if(ServerConnection.isFirstPerson())
- {
- //$coreTintOn = true;
- FadeInCoresTint();
- }
- }
- function clientCmdCoreEffectsNogo(%freq)
- {
- $coreTintOn = false;
- FadeOutCoresTint();
- }
- function FadeInCoresTint( )
- {
- $coresTint = true;
- HudOverlay.AnimateHudElementAlpha($HudOverlay::coresTintOverlay, 100, 0.3);
- }
- function FadeOutCoresTint( )
- {
- $coresTint = false;
- HudOverlay.AnimateHudElementAlpha($HudOverlay::coresTintOverlay, 0, 0.3);
- }
- ///////
- function SetDescriptionMessage( %text )
- {
- HudOverlay.setHudElementText($HudElement::DescriptionMessageText, %text, ImportantMessageProfile, true);
- }
- function SetDescriptionLine2Message( %text )
- {
- HudOverlay.setHudElementText($HudElement::DescriptionLine2MessageText, %text, ImportantMessageProfile, true);
- }
- function FadeInDescriptionMessage( )
- {
- $DescriptionPrintActive = true;
- HudOverlay.AnimateHudElementAlpha($HudElement::DescriptionMessageText, 255, 0.2);
- }
- function FadeOutDescriptionMessage( )
- {
- $DescriptionPrintActive = false;
- HudOverlay.AnimateHudElementAlpha($HudElement::DescriptionMessageText, 0, 0.5);
- }
- function SetDescriptionLine2Message( %text )
- {
- HudOverlay.setHudElementText($HudElement::DescriptionLine2MessageText, %text, ImportantMessageProfile, true);
- }
- function FadeInDescriptionLine2Message( )
- {
- $DescriptionLine2PrintActive = true;
- HudOverlay.AnimateHudElementAlpha($HudElement::DescriptionLine2MessageText, 255, 0.2);
- }
- function FadeOutDescriptionLine2Message( )
- {
- $DescriptionLine2PrintActive = false;
- HudOverlay.AnimateHudElementAlpha($HudElement::DescriptionLine2MessageText, 0, 0.5);
- }
Add Comment
Please, Sign In to add comment