Author Topic: Share Config/Console Code Stuff Thread  (Read 3532 times)

Offline Costigan_Q2

  • SPECIAL FORUM MEMBER
  • Jr. Member
  • *
  • Posts: 84
  • Quake ][ Forever
    • View Profile
  • Rated:
Re: Share Config/Console Code Stuff Thread
« Reply #15 on: October 17, 2024, 11:19:50 AM »
There is also the
Quote
unbind
command.
unbind <key>

Indeed.

Here is how you use config/console code to defunctionalise a button:

//defunctionalise a button bind
alias ALIAS ""
bind BUTTON "ALIAS"

Or do it this way:
bind BUTTON ""

By placing nothing between quotation marks in code you can defunctionalise a button.

I neglected to expand on the greater purpose/origin of this post so here goes:

My //many grapple hooks bind post contains code designed to allow you to switch between a wide variety of commands and one ultra-simple instance of button defunctionalisation, it inspired my //defunctionalise a button bind post.

The two binds below show you a blueprint for how to combine commands with button defunctionalisation.


//alternate a single command with button defunctionalisation bind
alias ALIAS1 "bind BUTTON1 ALIAS2;bind BUTTON2 COMMAND1;echo YES COMMAND1"
alias ALIAS2 "bind BUTTON1 ALIAS1;bind BUTTON2 ALIAS3;echo NO COMMAND"
alias ALIAS3 ""
bind BUTTON1 "ALIAS1"
bind BUTTON2 "ALIAS3"

BUTTON1 = change command using
BUTTON2 = use equipped command


//alternate multiple commands with button defunctionalisation bind
alias ALIAS1 "bind BUTTON1 ALIAS2;bind BUTTON2 COMMAND1;echo YES COMMAND1"
alias ALIAS2 "bind BUTTON1 ALIAS3;bind BUTTON2 COMMAND2;echo YES COMMAND2"
alias ALIAS3 "bind BUTTON1 ALIAS1;bind BUTTON2 ALIAS4;echo NO COMMAND"
alias ALIAS4 ""
bind BUTTON1 "ALIAS1"
bind BUTTON2 "ALIAS4"

BUTTON1 = change command using
BUTTON2 = use equipped command
« Last Edit: October 29, 2024, 06:23:01 AM by Costigan_Q2 »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Elysium Brightskins Collection.zip @ Elysium bright skins

Discord: Costigan (costigan_q2)

Offline Costigan_Q2

  • SPECIAL FORUM MEMBER
  • Jr. Member
  • *
  • Posts: 84
  • Quake ][ Forever
    • View Profile
  • Rated:
Re: Share Config/Console Code Stuff Thread
« Reply #16 on: October 17, 2024, 02:23:11 PM »
Here is how you use config/console code to defunctionalise a button:

//defunctionalise a button bind
alias ALIAS ""
bind BUTTON "ALIAS"

Or do it this way:
bind BUTTON ""

By placing nothing between quotation marks in code you can defunctionalise a button.

There is also the
Quote
unbind
command.
unbind <key>

Do this:
alias ALIAS ""
bind BUTTON "ALIAS"

Or this:
bind BUTTON ""

Or this:
unbind BUTTON

Nice.  :beer2:
« Last Edit: October 29, 2024, 06:23:32 AM by Costigan_Q2 »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Elysium Brightskins Collection.zip @ Elysium bright skins

Discord: Costigan (costigan_q2)

Offline Costigan_Q2

  • SPECIAL FORUM MEMBER
  • Jr. Member
  • *
  • Posts: 84
  • Quake ][ Forever
    • View Profile
  • Rated:
Re: Share Config/Console Code Stuff Thread
« Reply #17 on: November 03, 2024, 11:34:52 AM »
//disable hear-view chat bind
alias chatoff "cf1; cf2"
alias cf1 "bind BUTTON chaton; set cl_chat_sound 0; set con_notifytime 0"
alias cf2 "echo chat off"
alias chaton "cn1; cn2"
alias cn1 "bind BUTTON chatoff; set cl_chat_sound 1; set con_notifytime 3"
alias cn2 "echo chat on"
bind BUTTON "chatoff"

Alternate 'alias cf2' line:
alias cf2 "clear;echo chat off"
The 'clear' command clears the console of messages.

Or do it this way:
set cl_chat_sound "0"
set con_notifytime "0"


cl_chat_sound - This is a Q2PRO command, i don't know what else it works with.
Specifies sound effect to play each time chat message is received. Default value is 1.
0 — don’t play chat sound
1 — play normal sound (‘misc/talk.wav’)
2 — play alternative sound (‘misc/talk1.wav’)

con_notifytime - This is a regular Q2 command.
The delay before console messages disappear from the screen. Default value is 3.
0 — don't show console messages

For the 'cl_chat_sound' command the talk1.wav file is located just below the talk.wav file in the standard Quake 2 pak0.pak in \sound\misc.

For the 'con_notifytime' command if you set 'con_notifytime' to '0' you can still view the console messages by just opening up the console.

If you can't use the cl_chat_sound Q2PRO command then you could use a silent talk.wav file instead.

Follow this process:
1. Disconnect from the game you are currently playing and close the game client.
2. Put the pak attached to this post with your other pak files.
3. Open the game client and reconnect to the game you were previously playing.
4. After you finish playing the game remove the pak. (optional)

The pak attached to this post contains only one file, it is a silent talk.wav file.

p.s. This pak solution is to be used in conjunction with the con_notifytime regular Q2 command.
« Last Edit: November 03, 2024, 01:03:50 PM by Costigan_Q2 »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Elysium Brightskins Collection.zip @ Elysium bright skins

Discord: Costigan (costigan_q2)


 

El Box de Shoutamente

Last 10 Shouts:

 

Yotematoi

February 14, 2025, 12:41:48 PM
 :-*
 

|iR|Focalor

February 13, 2025, 07:31:24 AM
I was on DM this morning for the first time in a pretty long time. Seemed fine to me.

0rbisson

February 13, 2025, 04:54:21 AM
DM server is fucked. 2 point blank rockets from spawn and lava damage and player survived? WTF?" Also someone has fucked with the spawn points, every single time no matter how big the map you spawn right in front of the person who killed you last
 

rikwad

February 08, 2025, 10:48:18 PM
Seattle FFA now has working HTTP downloads. Thanks Unholy!
 
RIP Pepp   ✟
 
 

-Unh0ly-

February 03, 2025, 01:20:14 AM
vvvALL WEAPS HAVE MUZZLE FLASH vvvv
 

|iR|Focalor

December 25, 2024, 12:15:35 AM
 

|iR|Focalor

December 25, 2024, 12:06:54 AM
 

RailWolf

December 23, 2024, 09:15:50 AM
Fixed the image for you =)
And Die Hard is a great Christmas movie
 

|iR|Focalor

December 19, 2024, 04:55:07 AM
correction - you gotta put the whole word, not just w: {img width=210}

Show 50 latest
Welcome, Guest. Please login or register.
March 31, 2025, 03:58:20 PM

Login with username, password and session length