Low Caliber Club
Low Caliber Club
    Low Caliber Forum  Hop To Forum Categories  Work in Progress    BroadcastMessage, Colors, and storing variables to .TXT

Moderators: Impaler, Mr_Fister
Go
New
Find
Notify
Tools
Reply
  
BroadcastMessage, Colors, and storing variables to .TXT
 Login/Join
 
Peregrine
Picture of Methril
Online Status For 145666303
posted
Alright I have a few questions and I would like to know if anyone can help me. Ive been working on a small stats mutator, and This is what I have so far. I left out all the properties and junk so that you could see the code Im focusing on. Also, I would like to know how to store record variables into a text file so that I can keep track of people's stats.
==================================================
local RunePlayer Player;
local string PlayerName;
local float Score;
local float Deaths;
local int HeadKills;
if(Other.IsA('RunePlayer'))
{
Player = RunePlayer(Other);
PlayerName = Player.PlayerReplicationInfo.PlayerName;
Score = Player.PlayerReplicationInfo.Score;
Deaths = Player.PlayerReplicationInfo.Deaths;
HeadKills = Player.PlayerReplicationInfo.HeadKills;

BroadcastMessage(" Stats for "$PlayerName$" ");
BroadcastMessage(" Kills: "$Score$" Deaths: "$Deaths$" ");
BroadcastMessage(" Decapitated Enemys: "$HeadKills$" ");
==================================================Now, there are a few things bothering me about it. For one, it is all in default red. Does anyone know how to,
a. make it a runemessage.
b. reposition the text.
c. colorize the text.

The only other thing I really want to change is how when used, Deaths and Score return numbers with a lot of decimal places! Anyways, if anyone has anything to comment on or add, It would be appreciated.
 
Posts: 15 | Location: Edmonton,Alberta,Canada | Registered: Mon September 15 2003Reply With QuoteReport This Post
Treasurer
Picture of Unter den Uebrigen
posted Hide Post
Originally posted by Methril:
Does anyone know how to, a. make it a runemessage. b. reposition the text. c. colorize the text.
BroadcastMessage takes two optional parameters in addition to message text:
BroadcastMessage(coerce string Msg, optional bool bBeep, optional name Type)
The following, therefore:
BroadcastMessage("Stats for" @ PlayerName, false, 'Subtitle');
would produce a white, beepless message at the bottom of the screen.  There are fourteen message types with distinct color and placement:
  • 'Subtitle'
  • 'SubtitleMessage'
  • 'RedSubtitle'
  • 'SubtitleRed'
  • 'Pickup'
  • 'PickupMessage'
  • 'Say'
  • 'TeamSay'
  • 'SayMessage'
  • 'NoRunePower'
  • 'NoRunePowerMessage'
  • 'CriticalEvent'
  • 'DeathMessage'
  • 'Event'
If you want absolute control over the spacing and color, take a closer look at the function LocalizedMessage contained in RuneHUD.uc on line 592; you would do well to specify your own type and the means to interpret it.

 
Posts: 1457 | Location: Altadena | Registered: Tue January 07 2003Reply With QuoteReport This Post
Peregrine
Picture of Methril
Online Status For 145666303
posted Hide Post
Thank you very much Unter!
 
Posts: 15 | Location: Edmonton,Alberta,Canada | Registered: Mon September 15 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

    Low Caliber Forum  Hop To Forum Categories  Work in Progress    BroadcastMessage, Colors, and storing variables to .TXT

© Low Caliber Club 2002-4
Gallery | Chat | Archive | Tutorials | Red Carpet

Constitution

Members

Forum

Stats

Wiki