howto do cascading speech binds in CFG?


(Doodie) #1

Hi - i’m trying to setup some extra speech binds in a config file, basically to cover the handy speech binds NOT covered in the normal V speech-menu.

I intend to bind the num-keypad to these binds, but i can’t figure out how to create a cascading menu of binds.
I.E.
Press
numpad 7 (kp_home) to get into the Medic submenu and then press:
numpad 4 (kp_leftarrow) for FTHealMe “Heal me!”
numpad 5 (kp_5) for FTReviveTeamMate “Revive team mate!”
numpad 6 (kp_rightarrow) for FTReviveMe “Revive me!”

Likewise for the mortaring submenu, press:
numpad 8 (kp_uparrow) for the Mortar submenu and then press:
numpad 4 (kp_leftarrow) for FTResupplyMe “Resupply me!”
numpad 5 (kp_5) for FTMortar “Deploy mortar!”
numpad 6 (kp_rightarrow) for NeedTarget “I need a target!”

And finally my Construction submenu
numpad 9 (kp_pgup) for the construct submenu and then press:
numpad 4 (kp_leftarrow) for FTRepairObjective “Repair objective!”
numpad 5 (kp_5) for FTConstructObjective “Construct the objective!”
numpad 6 (kp_rightarrow) for DestroyConstruction “Destroy the construction!”

If anyone could give me a quick example of a CFG for these binds, i’d be eternally grateful :smiley:
:banana:


(Buckshoe) #2

Urr…well tbh I dont know how to do one of them menus like you get up for chat selection or class/weapon selection on etpro but if you look around some et download sites at the class selection scripts maybe one of them has that sort of stuff in it and you can nick it.

But what I can help you with is having a bunch of keys which do different things depending on what you press previously, cus thats one of the few things I’ve actually done with scripting. I spent ages mucking around looking for some sort of rebind command but you just set up a different .cfg file for each set of rebinds.
Then you load them with the “exec filename.cfg” command.
So with what you have got you would put binds for each of your sub menus in a seperate .cfg file and bind the 7 8 and 9 keys to exec Medmenu.cfg or whatever.


(^POTATO) #3

I think the best solution for this would be using several different configs. You would have one cfg to exec, in that cfg you might have:

bind kp_home “exec medic_vsays.cfg”
bind kp_uparrow “exec mortar_vsays.cfg”
bind kp_pgup “exec construct_vsays.cfg”

Then for each cfg that would be exec you will set the binds:

//medic_vsays.cfg
bind kp_leftarrow “vsay_team fthealme”
bind kp_5 “vsay_team ftreviveteammate”
bind kp_rightarrow “vsay_team ftreviveme”

//mortar_vsays.cfg
bind kp_leftarrow “vsay_team ftresupplyme”
bind kp_5 “vsay_team ftmortar”
bind kp_rightarrow “vsay_team needtarget”

etc.

For neatness you could put the 3 cfgs into a seperate folder (such as “VSAYS”), then just do this:
bind kp_home exec VSAYS/medic_vsays.cfg
bind kp_uparrow exec VSAYS/mortar_vsays.cfg
bind kp_pgup exec VSAYS/construct_vsays.cfg

You could even add echos so you know which one you chose (and know its the right one).


(Doodie) #4

Great stuff guys - exactly what i’m looking for :clap:
Thanks!