Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[NEED HELP] console send key or calling menus

#1
I specifically remember one CTF game in which -z- used a lot of team chat functions. I'm trying to learn to do that too.
By default, the menu provides the a few team chat messages, such as Need Help, Defending, etc. All these messages come with a waypoint sprite, which contains weapon and health info.
I'd like to bind them to different keys but can't figure out how.

1. Call I call the menu function directly?

I understand I can repeat what's in the menu:
Code:
] alias say_msg_need_help "say_team need help (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)
] bind H "say_msg_need_help; g_waypointsprite_team_helpme; cmd voice needhelp"
But I'm wondering whether I can save the repetition by calling it directly.


2. Is there a way to emit a key sequence so I can do something like
Code:
]bind H send_key "F8 2 0 5"
// open menu; team chat; continue(next page); defending

This would also be a good way to quickly switch grenade type.



3. Is there a way to place a waypoint sprite with information?

The sprite just says "HERE". Is it possible to include information?
Reply

#2
(05-06-2017, 04:09 PM)BuddyFriendGuy Wrote: I specifically remember one CTF game in which -z- used a lot of team chat functions. I'm trying to learn to do that too.

These are the binds I'm using for team communication: https://github.com/z/xonotic-config.pk3d...cation.cfg

Quote:By default, the menu provides the a few team chat messages, such as Need Help, Defending, etc. All these messages come with a waypoint sprite, which contains weapon and health info.

I'd like to bind them to different keys but can't figure out how.

1. Call I call the menu function directly?

I understand I can repeat what's in the menu:
Code:
] alias say_msg_need_help "say_team need help (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)
] bind H "say_msg_need_help; g_waypointsprite_team_helpme; cmd voice needhelp"
But I'm wondering whether I can save the repetition by calling it directly.

I believe what you're looking for is the userbind cvars.  I utilize these in my bindset.

Quote:2. Is there a way to emit a key sequence so I can do something like
Code:
]bind H send_key "F8 2 0 5"
// open menu; team chat; continue(next page); defending

This would also be a good way to quickly switch grenade type.

I'm not sure about the automation of the quick menu that you're asking about.  A traversing of the menu tree would be very cool though.

That being said, there is a command to switch nade, but I forgot what it is.  You'll have to bug Mario, he told me once, but I forgot to add it into my config.

Quote:3. Is there a way to place a waypoint sprite with information?

The sprite just says "HERE". Is it possible to include information?

I believe you're looking for these: https://xonotic.org/tools/cacs/#0a/0/g_w...rite_team_
Reply

#3
(05-06-2017, 05:33 PM)-z- Wrote: These are the binds I'm using for team communication: https://github.com/z/xonotic-config.pk3d...cation.cfg
Thanks, -z-. This is very helpful and inspiring.

What does %p mean in this line? For me it's displayed verbatim. Is there a list of these variables somewhere?

(05-06-2017, 05:33 PM)-z- Wrote:
Quote:1. Call I call the menu function directly?
I believe what you're looking for is the userbind cvars.  I utilize these in my bindset.

This helps, although differently. It looks like in our quickmenu code, we didn't directly call these userbinds -- instead we just repeat the config.

(05-06-2017, 05:33 PM)-z- Wrote:
Quote:2. Is there a way to emit a key sequence so I can do something like
Code:
]bind H send_key "F8 2 0 5"
// open menu; team chat; continue(next page); defending
This would also be a good way to quickly switch grenade type.
I'm not sure about the automation of the quick menu that you're asking about.  A traversing of the menu tree would be very cool though.

I think you are right -- from our code, it seems we can't do that yet. Having the ability to do this would also solve the repetition problem above.

(05-06-2017, 05:33 PM)-z- Wrote: That being said, there is a command to switch nade, but I forgot what it is.  You'll have to bug Mario, he told me once, but I forgot to add it into my config.

@Mario?

(05-06-2017, 05:33 PM)-z- Wrote:
Quote:The sprite just says "HERE". Is it possible to include information?
I believe you're looking for these: https://xonotic.org/tools/cacs/#0a/0/g_w...rite_team_

This is better than just HERE, although I was hoping to include customizable info (e.g. OUR FLAG).

Thanks to you -- I also discovered personal sprites. I think I'm gonna start using it to remember where the mega items are. I tend to get lost in new maps.
Reply

#4
(05-07-2017, 01:40 AM)BuddyFriendGuy Wrote: What does %p mean in this line? For me it's displayed verbatim. Is there a list of these variables somewhere?
%p is a placeholder for "playername you last looked at" -- it's a relic from Nexuiz days... Mario technically implemented it again in Xonotic because I'm stubborn, and kept using it.  I'm not sure it's in vanilla at the moment.  Here are a few more, this is not an exhaustive list http://xonotic.org/tools/cacs/#2a/0/replacement


(05-07-2017, 01:40 AM)BuddyFriendGuy Wrote: This helps, although differently. It looks like in our quickmenu code, we didn't directly call these userbinds -- instead we just repeat the config.
Ahh, I was confused, because there are "user-defined" options in the Main Menu system.  https://i.imgur.com/8BOKRGw.png

Quote:Waypoint sprites

These waypoint sprites are rasterized like I checked, the game isn't drawing the text dynamically, but that would be neat.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] Two weapons on each key? FAF 18 8,317 07-27-2022, 03:55 PM
Last Post: FAF
  [NEED HELP] Add Bots using Console in Xonotic OpenSourceGames 1 9,103 08-09-2019, 10:16 AM
Last Post: martin-t
  [BUG] Rebound "R" key, still occasionally does "team say" anyways Cynical 2 2,027 06-27-2019, 08:54 AM
Last Post: Cynical
  Chat key bind problem BuddyFriendGuy 4 3,390 01-26-2019, 11:12 PM
Last Post: BuddyFriendGuy
  [SOLVED] Weird key hold issue with official version Bloodthorn 9 5,815 05-21-2018, 07:56 AM
Last Post: Bloodthorn
  [BUG] Grappling hook breaks if no new key is pressed while it is midair (new since 8.2) reth 2 3,237 05-13-2017, 06:52 AM
Last Post: reth
  [NEEDS INFO] W key are not working in fedora24 linux akillah 2 3,601 03-06-2017, 08:35 PM
Last Post: -z-
  [FIXED] How do I pause game while having the console open? Beagle 8 7,085 05-14-2016, 02:35 PM
Last Post: Beagle
  [SOLVED] Multiple key press problem ZxEfR 3 5,728 06-16-2013, 04:52 AM
Last Post: Mr. Bougo
  [SOLVED] Binding a key to demo recording Archer 3 5,418 11-23-2012, 08:07 PM
Last Post: Mr. Bougo

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-