0
Answered

key rebinding

Link 6 months ago in Game Creator updated 6 months ago 9 1 duplicate

I have a topic before, but it shows answered. therefore, I don't if you could see it. so I submit a new one.

https://support.gamecreator.io/communities/1/topics/416-adding-more-melee-conditions-and-adding-key-rebinding

I am so sorry about some misunderstanding. I am not good at English T T. For the key rebinding, I mean that the player may change [Left Mouse Button] to [Key E] or [Key 1] or others in game. Therefore, if I want to do that, it seems that the input manager is a way?

Unity version:
-
Game Creator version:
-

Answers

Answer
Answered

Hi Link;

The Melee module also has key rebinding. Combos are given a unique Key stroke name that ranges from A up to F. How you call these keys is up to you.

For example, if your game is a mobile game, you can use a UI Button that, when pressed it calls the Melee key stroke A (using the Melee Input Action). For PC, you simply detect the key that you use as an attack (Left Mouse Button Trigger most likely) and call the Melee Input action.

This allows to have a cross-platform game with very little hassle.

As for conditions for the evade, you can simply make the Trigger that detects when the Shift key is pressed (evade), call a Conditions object that checks whether the player is on air or not (use the Character Property condition). 

We didn't add this to the demo scene because we didn't want to overcomplicate things and give you a barebones system you can use to build up your game.

Cheers!

Answer
Answered

I've merged both issues. Even if it's Answered, you can continue the conversation below and we'll reopen the ticket if we deemed it necessary.

Regarding your questions, I believe i understand what you mean. Despite this, it's unrelated to the Melee module. The Melee module is input-agnostic, meaning that it only listens to when the A, B, C, D, E or F commands are issued (which do not need to correspond to the keyboard keys, it's just a naming convention).

So, if you want to rebind the Left Mouse Button to the E key, you can open the Unity Input Manager (Edit -> Project Settings -> Input) and edit the keys there. Note that Game Creator only supports the current Input Manager. The new Input System will be addressed once it's stable and we have time to properly integrate it.

GOOD, I'M SATISFIED
Satisfaction mark by Link 6 months ago

Duplicates 1

for the key input rebinding, there is a method by some coding. But I don't know if it is good:


    change Trigger_Attack:


    add conditions

    Answer
    Answered

    Hi Link;

    The Melee module also has key rebinding. Combos are given a unique Key stroke name that ranges from A up to F. How you call these keys is up to you.

    For example, if your game is a mobile game, you can use a UI Button that, when pressed it calls the Melee key stroke A (using the Melee Input Action). For PC, you simply detect the key that you use as an attack (Left Mouse Button Trigger most likely) and call the Melee Input action.

    This allows to have a cross-platform game with very little hassle.

    As for conditions for the evade, you can simply make the Trigger that detects when the Shift key is pressed (evade), call a Conditions object that checks whether the player is on air or not (use the Character Property condition). 

    We didn't add this to the demo scene because we didn't want to overcomplicate things and give you a barebones system you can use to build up your game.

    Cheers!

    I am so sorry about some misunderstanding. I am not good at English T T. For the key rebinding, I mean that player may change [Left Mouse Button] to [Key E] or [Key 1] or others. Therefore, if I want to do that, it seems that the input manager is a way?

    Answer
    Answered

    I've merged both issues. Even if it's Answered, you can continue the conversation below and we'll reopen the ticket if we deemed it necessary.

    Regarding your questions, I believe i understand what you mean. Despite this, it's unrelated to the Melee module. The Melee module is input-agnostic, meaning that it only listens to when the A, B, C, D, E or F commands are issued (which do not need to correspond to the keyboard keys, it's just a naming convention).

    So, if you want to rebind the Left Mouse Button to the E key, you can open the Unity Input Manager (Edit -> Project Settings -> Input) and edit the keys there. Note that Game Creator only supports the current Input Manager. The new Input System will be addressed once it's stable and we have time to properly integrate it.

    Hi, Marti:


    thanks for your answer. It is related to GC core. sorry about that. But in GC, the key code correspond to the keyboard. 

    if I want to use it to like:

            if (Input.GetButtonDown("Fire1"))

    How to do that?


    Cheers!

    Link

    You can change the type of Trigger. Click where it says "Change Trigger" and a list of options will appear. You want to look one that says "On Mouse Down" and select the Left Button option.

    Then, whenever the left mouse button is pressed, it will call the A key of the Melee input.


    You could even make a game where both the D key is accepted and the Left mouse button, by simply duplicating this Trigger and setting one to detect keyboard key strokes and the other one to detect mouse button clicks.

    Hope this is clearer! Let me know if you have any other issues setting this up.

    I want players to be able to modify their buttons in the game, like the picture below

    Unfortunately, that's not possible at the moment. Game Creator currently doesn't have access to the Input bindings. You may be able to pull this using some custom Action, but Game Creator doesn't have it out of the box.

    +2

    Ok, it is a little disappointing. Thanks very much!