Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 10 Jan 2016 11:02 PM |
The ability so that the button you can create FOR MOBILE uses, like the jump etc.. You can say bind this button to CALL a key like "r"?
So that its universal not that it is per tool etc... But universal so when they press it, its like hitting "R" on keyboard?
Understand me?, if not i can clarify more if needed. |
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 10 Jan 2016 11:03 PM |
Im pretty sure its like a KeyDown function just called something different for mobile users. I would google it, if you cant find anything pm me, and I'll look
|
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 11:05 PM |
http://wiki.roblox.com/index.php?title=ContextActionService_tutorial
@Optimxl: KeyDown is deprecated, you should be using BindAction instead. |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 10 Jan 2016 11:06 PM |
Ive tried, and gotten a ton of opinions on this subject and currenctly im not the only one, but its not keydown your calling the key but someone hitting the mobile button, as you know you can create mobile buttons to do things.
http://wiki.roblox.com/index.php?title=ContextActionService_tutorial |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 10 Jan 2016 11:08 PM |
| @pin ive tried, you cant CALL a key like "R" that would be universal for everything... What im saying is hitting a button that is exactly like hitting "R" on a keyboard without using specific scripts per weapon. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 11:08 PM |
| I don't understand what you're saying, but if you mean that's for mobile only, that's incorrect. It's for both mobile/touchscreen and keyboard. |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 10 Jan 2016 11:11 PM |
| No, you can create a button, like the jump button FOR MOBILE USERS that you tap to jump... I want to make one that would work as a "R" key that is universal so one script thats it. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 11:12 PM |
Here's an example of how to bind a function to R
function Bind(actionName, userInputState, inputObject) DoThing() end game.ContextActionService:BindAction("Bind", Bind, false, Enum.KeyCode.R) |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 10 Jan 2016 11:15 PM |
| not bind, CALL so pressing it CALLS the hitting R function, or like say "r" opens the menu reloads the gun and does multiple things... instead of individual scripts per things, it works for all of them. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 11:18 PM |
That's what binding does. The arguments of BindAction are as follows:
BindAction("Bind", Bind, false, Enum.KeyCode.R)
1- "Bind" - the name of the binding 2- Bind - the name of the function to call 3- false - whether to create a touchscreen button 4- Enum.KeyCode.R - what controls are bound |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 10 Jan 2016 11:23 PM |
I understand but, i want it so that (its not WHEN you press "r" it ALSO its only for mobile users... And what it does is Call a KeyFunction, not call a function a key instead of: keys["R"] event when its pressed its what calls the key["R"] to call the event... So its exactly like pressing "r"... I dont think your understanding the concept of this..
|
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 11:27 PM |
| No, you are the one who doesn't understand the concept. |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 10 Jan 2016 11:28 PM |
| My friend ive posted this so many times, and its been turned down as false, unless roblox has updated this function... It doesnt exist! |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 11:31 PM |
| What are you even talking about? |
|
|
| Report Abuse |
|
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
|
| 10 Jan 2016 11:33 PM |
the way I'm doing this is a modulescript containing a key and the function, which you'll be able to edit for your platform it'll check whenever one of the keys there is pressed and calls the function
how simple |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 10 Jan 2016 11:35 PM |
1. Mobile Button 2. Only usable by mobile, CANT BE CALLED BY KEY OR ANYTHING BY COMPUTER! 3. On touch/tap whatever it is universal 3 ^ it is exactly like hitting "r" 4. Again only by mobile users
My own code:
--blah blah blah
--blah OnTouched() --blah CallKey["R"] --blah
Personally i have no idea how i would do this so bear with me. |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 10 Jan 2016 11:35 PM |
| @Ozzy, not when the key is pressed but instead; its like pressing the key but for mobile. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 11:36 PM |
| That is what ContextActionService is for. |
|
|
| Report Abuse |
|
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
|
| 10 Jan 2016 11:41 PM |
I understand what you mean, it makes no sense however and CAS does the job
I kinda forgot about the fact this was meant for mobile when writing my last post. It was for gamepads and keyboards |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 10 Jan 2016 11:43 PM |
| With COS you have to make it PER one, you can call it; like hitting "X" on a gamepad to call the "r" key or hitting this mobile button to also call the "r" key, theres nothing on the wiki specific about this function as there isnt one. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 11:44 PM |
| Why would you want to bind a mobile button to call a key?? Just bind the input to a mobile button, there's literally no reason not to. |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 10 Jan 2016 11:47 PM |
| Because i have a couple hundred things i would need to bind making the server ALOT laggier, instead of one small simple function. |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 10 Jan 2016 11:48 PM |
You have to explicitly bind the button presses to the "r" action, mobile input and non mobile input is completely different.
|
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 10 Jan 2016 11:49 PM |
| How would i go about doing that? |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 11:52 PM |
"Because i have a couple hundred things i would need to bind making the server ALOT laggier, instead of one small simple function."
What, and what? They do NOT cause that much lag, AT ALL! What are you using besides an original TI-30??? Even if they did, that would be on the CLIENT, it has NOTHING to do with the server.
Just use CAS and stop complaining. CAS does the job, end of story. |
|
|
| Report Abuse |
|
|