#so im here now chemicalcrux IDBB 1463

1 messages · Page 1 of 1 (latest)

summer spoke
#

so in this game you solve puzzles and all and you need to walk in a 3D world

#

the game is already out its albert innovation if you want to see the gameplay there is some videos of it im working on a update with rebinding because there is not one right now in it

#

So the thing i want to do is

#

not make any composites

#

to do each rebind at the time with one button for each keys

#

but the thing is that we cant do without composites for the main control

#

(wasd)

wind fossil
#

I still do not understand anything

summer spoke
wind fossil
#

how do you need to move

summer spoke
#

with the wasd keys

wind fossil
#

to do each rebind at the time with one button for each keys

wind fossil
#

can you move in diagonals?

summer spoke
#

yes

wind fossil
summer spoke
#

yes

wind fossil
#

e. g. to move in upper right direction you press W & D

summer spoke
#

yes

#

exactly

wind fossil
#

so what's the problem?

#

you can move with Input System I suppose?

summer spoke
#

the problem is that i have to go with the composites if i want to do diagonals right?

wind fossil
#

or you need to be able to move?

summer spoke
#

yes

wind fossil
summer spoke
#

you need composites to go in diagonals

#

and to move

wind fossil
#

if you wanna be able to press all the buttons together like..

if (W) ...
if (S) ...
if (A) ...
if (D) ...

and not..

if (W) ...
else if (S) ...
else if (A) ...
else if (D) ...

..then you need to make it composite

summer spoke
#

oh so it means

#

i can do it without composites?

wind fossil
summer spoke
#

but i need the new one

wind fossil
#

yes, then do it composite, that's all

summer spoke
#

but how do i do with buttons

wind fossil
#

would you like to explain?

summer spoke
#

yeah

wind fossil
#

for me to understand it better

summer spoke
#

with composites its not possible to do one button for each keys inside the composite

#

if my composite is wasd

#

i cant do a button to rebind w

#

without rebinding asd after that

wind fossil
#

you have just said that you do not need to do that?

summer spoke
#

yeah

wind fossil
#

you need to make'em all work together, don't you?

summer spoke
#

yes

#

so no composites but with the new input system im obliged to do that no?

wind fossil
#

what are you obliged to do?

summer spoke
#

do composites for wasd

wind fossil
#

no, you are not

summer spoke
#

what?

#

really?

wind fossil
#

Look.

#

You have said you need to be able to move in diagonal directions with WASD.
If you want them to be pressed together - you make them composite.
If you want them to work separately - you make them non-composite.

summer spoke
#

yeah but i dont want them to work separatly just be able to rebind them separatly

wind fossil
#

If you want them to be pressed together - you make them composite.

wind fossil
#

how do you want to do it and what's the purpose?

summer spoke
#

like for all game you can rebind just w

#

if you want it to be z

#

and you press a button

#

rebind

#

and its done

wind fossil
#

ohhhhhh

summer spoke
#

but with composite

wind fossil
#

you mean changing the button to move?

summer spoke
#

YES

wind fossil
#

you should have said it before

summer spoke
#

x) thats what im trying to say from the begining

#

rebind is changing button no?

wind fossil
#

you mean: "I don't wanna move back with S, I gonna move with X", right?

summer spoke
#

yeah right that's it

wind fossil
#

wait, I need to think how to do that in new Input System, default code

summer spoke
#

but i dont want to do like "I don't wanna move back with S, I gonna move with X, but to do that i need to do W,A then X then D"

#

and thank you a lot for your time im so sorry that i wasnt clear

summer spoke
#

okok so just

#

not one button to change all the keys

#

4

#

one for each

#

like one for w one for a one for s one for d

wind fossil
#
private InputAction movement;

private void ChangeWBinding()
{
    InputBuilding bindingW = moveAction.bindings.Find(w => w.name = "W_BINDING_NAME");

    bindingW.overridePath = KeyCodeToPath(KeyCode.Q); // e.g. Q key

    bindingW.ApplyBindingOverride(binding); // it's needed I guess
}

private string KeyCodeToPath(KeyCode keyCode) => $"<Keyboard>/{keyCode.ToString().ToLower()}";
#

apply it for all the bindings or make new void

#

@summer spoke

#

e.g.

summer spoke
#

wow

#

i love you

#

thank you so much

wind fossil
#

don't say it until it works

#

and I am not sure it works

summer spoke
#

yeah but its still a way to find the solution

#

im gonna try it thanks a lot

wind fossil
#
ChangeBinding("MY_NICE_W_BINDING", KeyCode.Q);
private void ChangeBinding(string bindingName, KeyCode newPath)
{
    InputBuilding bindingW = moveAction.bindings.Find(w => w.name = bindingName);

    bindingW.overridePath = $"<Keyboard>/{newPath.ToString().ToLower()}";

    bindingW.ApplyBindingOverride(binding);
}
#

@summer spoke try this method and write if something does not work

summer spoke
#

okok thank you very much