Advanced Search

Author Topic: [Scripting] Alias to Announce Current Health?  (Read 6444 times)

0 Members and 1 Guest are viewing this topic.

August 27, 2013, 07:42:17 PM
Read 6444 times

Offline Joseph Collins

  • MM8BDM Contributor

  • Lv. 33 Pogo Fan
  • *
  • Date Registered: October 09, 2010, 04:47:35 AM

    • View Profile
    • http://josephlithius.tumblr.com
[Scripting] Alias to Announce Current Health?
« on: August 27, 2013, 07:42:17 PM »
I'm really irritated that I couldn't figure this out on my own, given the resources available, but... how do I make a script that tells my team mates (or everyone in the room) my current health?  I just can't seem to get Zandronum to read my health, convert the variable into a printable text string.  In other words, I want to be able to press a key on the keyboard and have something like this display to everyone:
Quote
Me: I currently have 82 Life Energy.
How is this done?  I've seen others use it, but I never bothered to ask about it.  I couldn't find anything remotely helpful in my browsing of the web.  It doesn't have to be fancy or anything, though something that changes the health color to reflect how badly I need health would be a nice bonus.

Thanks in advance.

August 27, 2013, 07:45:14 PM
Reply #1

Offline Russel

  • MM8BDM Extender

  • Doc Croc
  • ***********
  • Date Registered: December 17, 2010, 11:11:25 PM

    • View Profile
Re: [Scripting] Alias to Announce Current Health?
« Reply #1 on: August 27, 2013, 07:45:14 PM »
The code used is $health.
But in order to tell the game to translate to actually be the current health, you want to set the variable chat_substitution to 1 via the console.

August 27, 2013, 07:46:09 PM
Reply #2

Offline Ceridran

  • MM8BDM Extender
  • **
  • Date Registered: April 07, 2012, 01:08:52 AM

    • View Profile
    • http://ceridran.tumblr.com/
Re: [Scripting] Alias to Announce Current Health?
« Reply #2 on: August 27, 2013, 07:46:09 PM »
I believe you had to type "sv_chat_substitution 1", or just "chat_substitution 1" and then saying $health, $ammo, $ammocount, $armor, $weapon, etc, would work.

Lego got it.

August 27, 2013, 07:50:51 PM
Reply #3

Offline Russel

  • MM8BDM Extender

  • Doc Croc
  • ***********
  • Date Registered: December 17, 2010, 11:11:25 PM

    • View Profile
Re: [Scripting] Alias to Announce Current Health?
« Reply #3 on: August 27, 2013, 07:50:51 PM »
sv_chat_substitution isn't a thing, silly :ugeek:

August 27, 2013, 07:51:50 PM
Reply #4

Offline Ceridran

  • MM8BDM Extender
  • **
  • Date Registered: April 07, 2012, 01:08:52 AM

    • View Profile
    • http://ceridran.tumblr.com/
Re: [Scripting] Alias to Announce Current Health?
« Reply #4 on: August 27, 2013, 07:51:50 PM »
The last time I used it was something like last year, so I don't even remember it that well.

August 27, 2013, 07:54:11 PM
Reply #5

Offline Russel

  • MM8BDM Extender

  • Doc Croc
  • ***********
  • Date Registered: December 17, 2010, 11:11:25 PM

    • View Profile
Re: [Scripting] Alias to Announce Current Health?
« Reply #5 on: August 27, 2013, 07:54:11 PM »
I used it once ever.

After making the post I used ctrl+f in my ini file to make sure I was correct.

August 27, 2013, 08:31:58 PM
Reply #6

Offline Joseph Collins

  • MM8BDM Contributor

  • Lv. 33 Pogo Fan
  • *
  • Date Registered: October 09, 2010, 04:47:35 AM

    • View Profile
    • http://josephlithius.tumblr.com
Re: [Scripting] Alias to Announce Current Health?
« Reply #6 on: August 27, 2013, 08:31:58 PM »
I knew... I absolutely knew... it was something stupidly simple like that.  Gah!

It's working perfectly.  Thank you very much.  >_<