Setting Controls At Runtime

RosalinaGalaxer

  • Posts: 239
Hey,

I'm trying to make a starting scene where the player gets asked to set up their controls. I downloaded the Custom Controls extension, but it gives me this on compilation:

/CustomControls.hx:29: characters 2-14 : Class<com.stencyl.Input> has no field mapKey

There were a couple other errors, one talking about Iterables, another about a missing field "unmapControl", but this one came up multiple times, so I thought I'd put it up in full.

Does anyone know what's going on here and how to fix it, or know of another way to set up custom controls? Thanks!
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

JeffreyDriver

  • Posts: 2262
I haven't used the extension, but under the USER INPUT blocks you can get the current input so it's possible to create your own behaviour for this. It shouldn't be too difficult, but if you get stuck, you post another question. Some advice: try and make it so that you can export it and reuse it in other projects.

RosalinaGalaxer

  • Posts: 239
I've always kinda wondered about making something exportable. Is there an article for that somewhere? Also, thanks for the tip, but it doesn't look like there's any blocks there that can set control attributes...
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

CmdrWhitey13

  • Posts: 505
Link may help WRT controls:

http://www.stencyl.com/help/view/controls/

As for exporting, click on the behaviour/ sound/ font/ and bottom right has a button to export. You can also right-click on either and select export.

Hope  it helps.

RosalinaGalaxer

  • Posts: 239
Thanks, Cmdr, but I've already read through that, and came up with nothing.

Btw, what does WRT stand for?
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

CmdrWhitey13

  • Posts: 505
WRT - with regards to. Kind of short handed.

RosalinaGalaxer

  • Posts: 239
Hmm, good to know.

So after messing around some more on my own, it turned out I was on the right track, I just needed to work on it some more. The code is attached for you people in the future. The drawing event can pretty much be omitted for something of your own, it was for my game specifically.

Thanks for the help!
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz