playMaker

Author Topic: Keypad  (Read 3394 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Keypad
« on: November 02, 2015, 11:14:08 PM »
Hi!

I want to make a keypad in my game, so I will be able to write a code, etc. when I click on the numbers, like a normal keypad 0-9.
Is that possible with playmaker? And if it is, how would I start? I have the keypad ready. I just need the Playmaker Actions.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Keypad
« Reply #1 on: November 03, 2015, 03:15:17 AM »
Hi,
so you mean like an onscreen keypad?

if you are on u4.6+ you can use ugui buttons or if you want it to be in your game (3d) you can use mouse pick event

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Keypad
« Reply #2 on: November 03, 2015, 10:48:59 AM »
Hi!

Yes, I mean onscreen keypad! I have the buttons ready, but one thing I don't understand. How can I make it so the numbers will appear in a textfield? Like when I'm writing here on the forum. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: Keypad
« Reply #3 on: November 03, 2015, 01:34:48 PM »
I think I would do it with a ugui Text game object that looks at a string variable every frame. I'd probably use the Set Property action for this.

Then I would update that string variable with my keypad buttons. I'd probably use a build string action for that.

Hope that helps!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Keypad
« Reply #4 on: November 03, 2015, 05:01:03 PM »
Hi,
I made a sample that you can try out.
you need to have playmaker and the ugui proxy full package

you can get the package on the EcoSystem.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Keypad
« Reply #5 on: November 03, 2015, 06:27:02 PM »
oops i forgot to add the attachment.... here you go :)
« Last Edit: November 03, 2015, 06:30:56 PM by djaydino »

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Keypad
« Reply #6 on: November 04, 2015, 08:10:00 AM »
Hi,
I made a sample that you can try out.
you need to have playmaker and the ugui proxy full package

you can get the package on the EcoSystem.

Thank you! :)

Did this really work for you?
Because I got this loop error "KeyPad : FSM : Loop count exceeded maximum: 1000 Default is 1000. Override in Fsm Inspector."

I had to put a wait action in the state "Set Text", then it worked fine. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Keypad
« Reply #7 on: November 04, 2015, 09:18:05 AM »
Hi,
Yes it works for me but when i tried with my double click button i also got a loop count so i added a next frame action :


Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Keypad
« Reply #8 on: November 04, 2015, 09:28:06 AM »
Strange!
I got the error even if I clicked only once.
But it worked with Next Frame. :)

Thank you so much for helping me with this. It works fine with the rest of the logics in the game. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no