Results 1 to 15 of 15

Thread: Scripting Button Hot Key

  1. #1
    Join Date
    May 2017
    Location
    Rocklin, CA
    Posts
    75

    Scripting Button Hot Key

    What is a scripting button hot key? What are the scripting button hot keys? Are they the numeral keys 0 thru 9? Or are they some other unspecified keys on the keyboard?

  2. #2
    Join Date
    Jan 2014
    Posts
    978
    They are unbound in the configuration controls menu.

  3. #3
    Join Date
    May 2017
    Location
    Rocklin, CA
    Posts
    75
    Found them. Thanks
    Not sure how useful these are. It seems they can only be bound by each individual user on their own machine. How would a game developer bind them to specific keys through scripting? Or is there another method that can be used to bind them when developing a mod?
    Thanks for any insight.

  4. #4
    Join Date
    May 2016
    Posts
    1,072
    I think the idea is, if you had use for them, you'd just leave an instruction note to inform players you have set up control keys. And they may need to be bound in the options menu.

  5. #5
    Join Date
    Jan 2014
    Posts
    978
    Hotfix 1 now live. Please restart Steam to ensure you have the latest update.
    Number key actions will no longer work on the numpad like drawing cards, etc.
    Scripting buttons have been assigned to the matching numpad number key.
    Hotkeys had to be reset again.
    Fixed scripting buttons events firing when typing in input fields.

  6. #6
    I love you, Knil.

    PS. Hotkey buttons events are triggering for spectators (dunno if intended).

  7. #7
    How do hotkeys work? How do I use them in my scripts? Say I want to have a hotkey for "draw 1 card" or to activate a script function "populateOffer()" ?
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  8. #8
    Code:
    function onScriptingButtonDown(int index, string player_color)
        print('Player ' .. player_color .. ' just pressed scripting button #' .. index)
    end
    
    function onScriptingButtonUp(int index, string player_color)
        print('Player ' .. player_color .. ' just released scripting button #' .. index)
    end
    Some time ago I've made a small tool for easier combination binding if someone wants: https://github.com/tjakubo2/TTS_lib/tree/master/Hotkey

  9. #9
    I do not understand what that page is? You copy that entire code into your script? How do you define the hotkeys and stuff?
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  10. #10
    If you mean the github page, the script (to ba pasted or #include'd) is in Hotkey.ttslua file there and usage instructions are visible when you open the link, under README.md.

  11. #11
    I still do not understand how these work. what is a "#include" mean and the instructions as far as can see do not say anyting about how you set the hotkeys and how they trigger.
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  12. #12
    Ok I finally worked out what an "include" is and that the hotkeys are assigned by the user in the settings of the TTS application NOT in code.

    questions about this script... What dose it actually do?

    Like it seems like a ton of code.. how is it different from

    Code:
    function onScriptingButtonDown(int index, string player_color)
        print('Player ' .. player_color .. ' just pressed scripting button #' .. index)
    end
    Also... if you use it like...

    Code:
    Hotkey.Bind(Table combination, Function handler, String direction)
    Where do you put this? in Global? Also, dose it know what player pressed it so it can do different things per-player?
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  13. #13
    Also.. how do you assign key combinations...

    Like say I want CTRL+Q for CTRL+F1 to trigger the script?
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  14. #14
    Include (or paste in) the script, add the example script from "example usage" section (which is commented too) and you should be able to figure it out. Press 5th button or 1st, 3rd and 9th button at once to trigger those functions.

  15. #15
    I still do not understand what this script you have made dose.. it looks very cool and is a lot of lines.. but how is it different from just doing the code you posted above? Like what is the functionality of this script?
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

Similar Threads

  1. Make button click functions return button parameters and/or index
    By MrStump in forum Scripting Suggestions
    Replies: 0
    Last Post: 05-16-2017, 10:10 PM
  2. Replies: 0
    Last Post: 05-15-2017, 07:49 PM
  3. Button corners
    By Shifty in forum Scripting
    Replies: 0
    Last Post: 08-28-2016, 08:34 AM
  4. Replies: 4
    Last Post: 08-09-2016, 12:05 AM
  5. Replies: 8
    Last Post: 06-07-2016, 11:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •