playMaker

Author Topic: Keyboard Build String Action  (Read 2191 times)

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 126
    • View Profile
    • MABManZ.com
Keyboard Build String Action
« on: August 20, 2013, 01:58:36 PM »
I've been building a custom GUI using Playmaker FSMs and 3D Objects (planes and 3D Text in front of camera).

I'm trying to make a field where the user can type a name (set a string value) using keyboard input, but I'm not seeing any way to do this. The GUILayout Textfield does not match my other UI elements and is tricky to work with to position it to multiple resolutions.

I found the iOS/Android Keyboard action, but I would like something similar for a normal desktop keyboard, where it will begin receiving input and build a string.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14458
  • Official Playmaker Support
    • View Profile
Re: Keyboard Build String Action
« Reply #1 on: August 24, 2013, 04:59:37 AM »
Hi,

 You can listen to keyboard inputs using this custom action:

http://hutonggames.com/playmakerforum/index.php?topic=487.msg1882#msg1882

 Bye,

Jean

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 126
    • View Profile
    • MABManZ.com
Re: Keyboard Build String Action
« Reply #2 on: August 24, 2013, 09:04:57 PM »
Thanks, I tried using this action and it appears to not be storing the string variable correctly...the string will reset to a null value immediately (despite moving to a new event that should not change the value) , and seems to only store the string if you hold the button and it will sometimes appear for a split moment (looking at the inspector)

Unfortunately this isn't a very useful action with this problem.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14458
  • Official Playmaker Support
    • View Profile
Re: Keyboard Build String Action
« Reply #3 on: August 26, 2013, 07:01:43 AM »
Hi,
 
It's likely your logic that reset the variable. The action in itself doesn't reset it, it only set it, and then fire an event. I would double check on a simple Fsm to validate that action first and then move it into your more complex logic.

 Bye,

Jean

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 126
    • View Profile
    • MABManZ.com
Re: Keyboard Build String Action
« Reply #4 on: August 26, 2013, 10:10:47 AM »
I've tried it literally with nothing else in the FSM, it's just an a state than runs the event and then goes to finished into an empty state (state 2). It never stores a variable, not sure what I could be doing wrong :(
« Last Edit: August 26, 2013, 10:13:08 AM by MABManZ »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14458
  • Official Playmaker Support
    • View Profile
Re: Keyboard Build String Action
« Reply #5 on: September 09, 2013, 02:30:02 AM »
Hi,

 Just tried and it works. Are you on Mac or windows? are you using the latest playmaker from the asset store?

bye,

 Jean