playMaker

Author Topic: How would you remap keyboard shortcuts for game controls using Playmaker?[SOLVED  (Read 3223 times)

PolyMad

  • Hero Member
  • *****
  • Posts: 545
As per title: I would like to give my users option to remap control keys on PC keyboard.
What is the most efficient way to do it?
« Last Edit: January 11, 2019, 02:41:38 AM by jeanfabre »

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: How would you remap keyboard shortcuts for game controls using Playmaker?
« Reply #1 on: September 08, 2018, 04:13:51 AM »
Use Rewired, don't waste time on that :)
Available for Playmaker work

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: How would you remap keyboard shortcuts for game controls using Playmaker?
« Reply #2 on: September 08, 2018, 02:43:22 PM »
Uhm maybe I haven't been clear.
How do I do to replace the keys I'm reading in Playmaker actions with something user-defined?
I want to do an interface where the player chooses to replace the forward button W with in example E.
If I am hard coding this in a Playmaker action, I won't be able to reassign it later on.
So, how does this work?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How would you remap keyboard shortcuts for game controls using Playmaker?
« Reply #3 on: September 10, 2018, 03:09:30 AM »
Hi,

 I concur with Krmlko, you should use a proper asset to remap your input. Rewired, being the goto solution, also there are others ( check that they do support PlayMaker though)

 However is you want to do it in pure PlayMaker:

- you either modify the actions that takes Input ( duplicate the actions, so that PlayMaker update don't erase your mods on the next update)

- without any code, you will need to listen to the inut in a dedicated FSM, which then will know about the mapping and send a PlayMaker event or set a global variable, with the mapped input. ALL other fsms will need to check that global variable or listen to that event in order to get the mapped input they want. You can't use GetAxis, or Any Input based actions since they don't have mapping support built in.


I strongly recommend not to go to far with this, Input Mapping is very complex as soon as you start to want to provide some UI to let the player choose, it's best to leave that to complex assets like rewired.


Bye,

 Jean

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: How would you remap keyboard shortcuts for game controls using Playmaker?
« Reply #4 on: September 10, 2018, 03:19:34 AM »
OK Jean, thank you... then I'll leave without configuration for the beginning, and add it later on with a plugin.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: How would you remap keyboard shortcuts for game controls using Playmaker?
« Reply #5 on: September 10, 2018, 08:50:15 AM »
Hi.
You can check out one of my older videos :


And you can test it on the Tetris game on my website.

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Hey! Thank you!

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Sorry for bumping, i don't get this video djaydino posted.

« Last Edit: January 28, 2021, 05:53:42 AM by krmko »
Available for Playmaker work

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Hi.
you mean you can't see it?