playMaker

Author Topic: Send Key/Button[SOLVED]  (Read 6458 times)

nswayze

  • Playmaker Newbie
  • *
  • Posts: 8
Send Key/Button[SOLVED]
« on: December 27, 2016, 11:52:16 PM »
Hi,

I'd like to use an event which pushes the letter "u" on the keyboard.


Is this possible?

Thanks,

Nswayze

« Last Edit: March 29, 2019, 02:16:45 AM by jeanfabre »

nswayze

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Send Key/Button
« Reply #1 on: January 06, 2017, 10:00:02 AM »
Bump


I don't mean "U" specifically I'm just looking for a way to send a key

jrock84

  • Playmaker Newbie
  • *
  • Posts: 23
    • Divergent Worlds Interactive
Re: Send Key/Button
« Reply #2 on: January 06, 2017, 10:18:54 AM »
Would the "Get Key Down" action work for you?

nswayze

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Send Key/Button
« Reply #3 on: January 09, 2017, 09:01:57 AM »
Thanks for trying. The Get Key Down is more like a listener. So it waits till it's pressed and then launches an event.


I've got some keys setup in my Input Controller and, I need Playmaker to press those keys

jrock84

  • Playmaker Newbie
  • *
  • Posts: 23
    • Divergent Worlds Interactive
Re: Send Key/Button
« Reply #4 on: January 09, 2017, 10:50:25 AM »
Ahh, I gotcha! Maybe someone else can weigh in on this, but I don't think there's currently an action for this. You could potentially write one or just use a script and call that function.

See this post.
http://answers.unity3d.com/questions/588786/is-it-possible-to-simulate-a-keypressinput-in-code.html

Silicon Power

  • Full Member
  • ***
  • Posts: 186
Re: Send Key/Button
« Reply #5 on: February 13, 2019, 08:38:45 AM »
I really need something like this!  :-*
 

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Send Key/Button
« Reply #6 on: February 15, 2019, 03:20:26 AM »
Hi,

 well, you are best off using a proper Input system like Rewired, it's worth it because you can then take full control over inputs. Unity built in input system is very limited.

 Bye,

 Jean

amoraleite

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Send Key/Button
« Reply #7 on: March 25, 2019, 06:43:19 PM »
I really really need this action to :D

I have a Script that works only with keyboard, but my app is for mobile...
I have many letters in this script that have many other functions, will be more easy if I have an action that call theses letters from keyboard.


Thanks for this great tool playmaker team!

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Send Key/Button
« Reply #8 on: March 26, 2019, 12:45:23 AM »
You have to think differently. You don’t want to press the U key, but you want to execute the same routines that are executed after pressing U. To do this, simply add (global) events wherever you also listen for the key. Then whatever “presses the U key” broadcasts an event, and in turn, all the routines are executed as if the U key was pressed.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Send Key/Button
« Reply #9 on: March 26, 2019, 03:28:58 AM »
Hi.
This video can help understand how to use global transitions.


But if you need these key presses for another script (non playmaker)

When you use ui buttons maybe you could use the On Click ()

click on the +
then drop in the script and search for what you want to trigger.
« Last Edit: March 27, 2019, 06:01:26 PM by djaydino »

amoraleite

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Send Key/Button
« Reply #10 on: March 27, 2019, 04:45:24 PM »
Hi Guys!
Thank you a lot for the tips!
I solved my night with the unity onclick direct on the unity button.

Just drag and drop the script to the button on the unity and I had acesses to the functions that I want...

some functions I had to make a public void to see in the button onclick options...

In the end the script maybe not work for me :(
I need take screenshoots from the camera and load this for the screen/HUD when the player want see, like a gallery image. Is for kids and because this I can't save on the system library, the kid can't go out of the app. 

If you guys have an asset to do this I'll buy for sure!
Thanks again!