Results 1 to 8 of 8

Thread: One key - two different scripts. It's possible ? Bind for Capslock.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private First Class G-Stuff002's Avatar
    Join Date
    Jan 2018
    Posts
    212
    Thanks
    42
    Thanked 109 Times in 107 Posts

    One key - two different scripts. It's possible ? Bind for Capslock.

    Hello, is it possible to bind two different scripts on one button, for Capslock ?

    There are two enable and disable commands which i need to integrate on one button:

    Bind "capslock" "host_timescale 0.3"
    Bind "capslock" "host_timescale 1.0" -------Maybe when the capslock is turned on, it is written like: capslocktoggle


    My bind doesn’t work, unite it like this:

    Bind "capslock" "host_timescale 0.3"; "host_timescale 1.0"
    the first script works the second no



    1. Found example from the net (May help to understand)

    I know that there is a command: Bindtoggle
    How to use the BindToggle command So, the BindToggle command, like the light on button — pressed once — turned on, turned on the second time. The principle of the team is exactly the same. Consider the simplest example of the cl_showfps command, with which you can view the FPS in the game. Bind example BindToggle F2 "cl_showfps 1" It turns out, if you press F2, then in the upper right corner you will see the inscription: NUMBER of fps on map THE MAP WHICH YOU ARE PLAYING


    2. Found example from the net from different game(May help to understand how to script capslock)


    I know that there is a command: alias (is important)

    Script to enable - disable auto-attack

    dota_player_units_auto_attack 1
    bind CAPSLOCK "AutoAttack"
    alias AutoAttack AutoAttackOff alias AutoAttackOff "dota_player_units_auto_attack 0; clear; echo AutoAttack-Off; say_team AutoAttack-Off; alias AutoAttack AutoAttackOn"
    alias AutoAttackOn "dota_player_units_auto_attack 1; clear; echo AutoAttack-On; say_team AutoAttack-On; alias AutoAttack AutoAttackOff"


    Sorry to write here, but here on this site have the best programmers
    Last edited by G-Stuff002; 5th August 2019 at 23:25.

  2. The Following User Says Thank You to G-Stuff002 For This Useful Post:

    kung foo man (6th August 2019)

Posting Permissions

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