generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Have they added this yet...?

Previous Thread :: Next Thread 
Link5659 is not online. 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 is not online. 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
pinballboy7 is not online. pinballboy7
Joined: 12 Mar 2009
Total Posts: 1485
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 is not online. 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 is not online. 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
pinballboy7 is not online. pinballboy7
Joined: 12 Mar 2009
Total Posts: 1485
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 is not online. 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
pinballboy7 is not online. pinballboy7
Joined: 12 Mar 2009
Total Posts: 1485
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 is not online. 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
pinballboy7 is not online. pinballboy7
Joined: 12 Mar 2009
Total Posts: 1485
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 is not online. 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
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
10 Jan 2016 11:27 PM
No, you are the one who doesn't understand the concept.
Report Abuse
Link5659 is not online. 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
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
10 Jan 2016 11:31 PM
What are you even talking about?
Report Abuse
OzzyFin is not online. 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 is not online. 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 is not online. 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
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
10 Jan 2016 11:36 PM
That is what ContextActionService is for.
Report Abuse
OzzyFin is not online. 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 is not online. 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
pinballboy7 is not online. pinballboy7
Joined: 12 Mar 2009
Total Posts: 1485
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 is not online. 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 is not online. 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 is not online. Link5659
Joined: 04 Jun 2012
Total Posts: 4525
10 Jan 2016 11:49 PM
How would i go about doing that?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image