1. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Changing knight controls

Discussion in 'Modding Help' started by king-george, Sep 25, 2016.

Tags:
  1. king-george

    king-george Haxor Staff Alumni Tester

    Messages:
    284
    Alright, so after 4 years of playing KAG, I've finally decided to try doing some modding. I don't like reading tutorials, so I just jumped right into the code(yes I know this is a bad thing to do, but I have coding experience in other languages).
    The mod is good so far, the mod allows knights to instantly slash. However, I would like to improve it.

    So, when you hold down LMB, you charge and can do a double slash, but instead of that I want the player to constantly slash when the LMB is held down. Is there any way this can be done?
     
  2. Frikman

    Frikman Bison Rider

    Messages:
    162
    You should check if the slashing action triggered by LMB is managed by a "IsKeyJustPressed" or "IsKeyPressed" line (I don't know their names, just what they do heher). If the slash is done by "IsKeyJustPressed" it'll check if the button (key_action1 in this case) was tapped, but with "IsKeyPressed" it'll check if the button is held. I don't know if it helps :^/
     
    makmoud98 and king-george like this.
  3. king-george

    king-george Haxor Staff Alumni Tester

    Messages:
    284
    Hey, your post helped me a lot! I haven't gotten it to work yet, but I am on the right track.
     
    Frikman and makmoud98 like this.