#SCRIPT TO RUN

1 messages · Page 1 of 1 (latest)

ionic marsh
#

I have this script to run when I double-click on "W" but I wanted to add other keys in addition to "W" as well. Does anyone know how to easily add more keys?

idle shell
#

holy

#

if input == "s"

#

if input == "h"

#

please use your brain

sullen bay
thorn rampartBOT
#

studio** You are now Level 4! **studio

sullen bay
idle shell
#

make it simple for him you moron

#

fucking morons like you ruin rsc btw

#

if he had multiple if statements he could organize them with multiple other connection functions

#

or using CAS

sullen bay
idle shell
#

but CAS isnt easy because hes obviously a beginner

idle shell
#

no it doesnt

sullen bay
idle shell
#

we were both beginner and we both used UIS

idle shell
#

you have to learn a bunch about other things when doing cas

#

do you have a brain?

sullen bay
#

no u don't it's two new things, the function itself, and how it works

idle shell
#

you have to read the documentation for like a long time

#

half the things in cas he doesnt know

#

learn how to bind learn about context and actions

sullen bay
#

ContextActionService:BindAction("Run", Run, true, "w", Enum.KeyCode.S)--add other running buttons
These two are the only things he has to understand before he can implement it

idle shell
#

input objects input state

idle shell
#

holy just sau ur dumb

#

also has to learn about adding multiple keycodes

#

the small things pile up

#

and it becomes difficult for him

#

now tell me

#

is it easier to learn about the small things or go with the slightly inneficient way hes going with

sullen bay
idle shell
#

btw didnt you tell me to use raycasts when you didnt know what i was talking about

#

you dont know anything

sullen bay
#

can legit doContextActionService:BindAction("Run", Run, true, "w","s", "z")

sullen bay
idle shell
#

certified dumbass

idle shell
#

LMAOO

sullen bay
#

U don't NEED to type out the keycodes themselves

idle shell
sullen bay
idle shell
#

cas can be more efficient than uis but uis is clearly easier to teach and learn

native elk
#

if hes a beginner why not just let him use a simple, somewhat inefficient method. whats the point in arguing

idle shell
native elk
#

hes just learning

idle shell
#

also when changing keybinds he has to learn to detect whgenever its changed unbind action and rebind it

native elk
#

therefore no need for anything more advanced than uis

idle shell
#

that isnt going to be easy for him

sullen bay
#

ContextActionService:BindAction("Run", Run, true, "w")
In his function he just checks whether the context recieved is "Run" and that's it

idle shell
#

please stop talking

sullen bay
#

the string Run is the context

idle shell
#

what hes doing right now is correct and even if it is inneficient its okay

sullen bay
#

im giving him a more efficient and better method

idle shell
#

he wont mess up his brain because he learns an inefficient thing

#

which is going to be harder for him to learn

sullen bay
#

CAS isn't hard bro 😭

idle shell
#

he has to learn the basics then move up. you expect him to use physics, lerping instead of tweening, all because its more efficient

#

please grow a brain

sullen bay
#

if he knows how to check for inputs from players he can use CAS, if he has ur level of intelligence he might struggle thouugh

idle shell
#

lerping isnt "hard" either

#

but should he learn it

#

no

#

hes a beginner

#

nothing is hard but constantly learning new things is going to be tough for him

#

let him get USED to and MASTER what he knows

#

before learning other things

sullen bay
idle shell
#

BindAction(actionName : string,functionToBind : function,createTouchButton : boolean,inputTypes : Tuple):()
Bind user input to an action given an action handling function.

BindActionAtPriority(actionName : string,functionToBind : function,createTouchButton : boolean,priorityLevel : number,inputTypes : Tuple):()
Behaves like BindAction but also allows a priority to be assigned to the bound action for overlapping input types (higher before lower).

BindActivate(userInputTypeForActivation : Enum.UserInputType,keyCodesForActivation : Tuple):()
Bind a Enum.KeyCode with a specific Enum.UserInputType to trigger Tool.Activation and ClickDetector events.

GetAllBoundActionInfo():Dictionary
Get a table of information about all bound actions (key is the name passed to BindAction, value is a table from GetBoundActionInfo when called with the key).

GetBoundActionInfo(actionName : string):Dictionary
Get a table of information about a bound action given its name originally passed to BindAction.

#

GetButton(actionName : string):Instance
Yields
Retrieves a ImageButton of a bound action that had a touch input button created.

GetCurrentLocalToolIcon():string
Return the BackpackItem.TextureId of a Tool currently equipped by the Player.

SetDescription(actionName : string,description : string):()
Given the name of a bound action with a touch button, sets the description of the action.

SetImage(actionName : string,image : string):()
If actionName key contains a bound action, then image is set as the image of the touch button.

SetPosition(actionName : string,position : UDim2):()
Given the name of a bound action with a touch button, sets the position of the button within the ContextButtonFrame.

SetTitle(actionName : string,title : string):()
Given the name of a bound action with a touch button, sets the text shown on the button.

UnbindAction(actionName : string):()
Unbind an action from input given its name.

UnbindActivate(userInputTypeForActivation : Enum.UserInputType,keyCodeForActivation : Enum.KeyCode):()
Unbind a Enum.KeyCode with a specific Enum.UserInputType from triggering Tool.Activation when bound with ContextActionService:BindActivate().

UnbindAllActions():()
Removes all functions bound. No actionNames will remain. All touch buttons will be removed.

#

he has to learn majority of that

#

if hes making a mobile compatible game he has to learn all of it

sullen bay
#

no he doesn't know

#

no he doesn't

native elk
#

this argument is stupid just let the guy master the basics 🙏💔

idle shell
#

its inefficient yes, but it can be organized

sullen bay
sullen bay
idle shell
idle shell
idle shell
#

buddy

#

right now he knows UIS

#

let him stick to it

#

even if his method is inefficient

#

if he wants to overburden himself by learning CAS he can but once again

#

its an overburden

sullen bay
#

local function Run (actionname, inputState)
if actionname == "Run" and inputState == Enum.UserInputState.Begin then
--running script
end
end
ContextActionService:BindAction("Run", Run, true, "w", Enum.KeyCode.S, Enum.KeyCode.DPadUp )--add other running buttons

#

it's that easy

#

if he wants to add more buttons he just goes to context line and adds new letters as needed

#

he can add controller inputs, mobile inputs, etc

idle shell
#

yes and lets say he has more knowledge about UIS than CAS, eventually if he wants to do something else with his current knowledge he will think "I can use UIS to do this, but pipeitupwho told me to use CAS. looks like i have to go out of my way to learn how to do this using CAS"

idle shell
sullen bay
sullen bay
sullen bay
idle shell
idle shell
sullen bay
idle shell
#

oh my god

sullen bay
#

Right now, taking in inputs

idle shell
#

youre brain is so stupid

sullen bay
#

He SHOULD learn cAS

idle shell
#

HE HAS A SCRIPT ALREADY. YOU TOLD HIM TO REWRITE HIS ENTIRE SCRIPT BECAUSE ITS INEFFICIENT

#

i saved him a burden by telling him to continue his script

sullen bay
# idle shell hes a fucking beginner bro

EXACTLY, if he's learning how to use inputs and wants to USE multiple INPUTS for the same THING, CAS IS PERFECT. It's the PERFECT oppurtunity to learn it as well

sullen bay
#

He legit has the textbook use case for CAS

idle shell
sullen bay
#

why shouldnt he learn it?

idle shell
#

because hes a beginner

#

he can learn it when hes mastered UIS

idle shell
sullen bay
idle shell
sullen bay
#

"Why teach someone the proper solution to an issue that's relatively EASY so he can learn? when he can use some dumbo logic bloat I know will set him back"

idle shell
#

bro do you have a brain

#

HE ALREADY has a script for it

#

bro youre so nonsensical

#

YOU MISUNDERSTOOD and youre wrong. stop sticking to a point that was for an argument you werent arguing for

idle shell
sullen bay
#

U are dumb I am not, stop projecting

sullen bay
#

ur a idiot

thorn rampartBOT
#

studio** You are now Level 5! **studio

idle shell
#

its an overburden to constantly learn "efficient" methods

idle shell
#

his code works

#

i never told him to rewrite his code

#

hes going to have trouble rewriting his code

sullen bay
#

holy ur dumb 😭

idle shell
#

and ur the guy that said he, a beginner should learn lerping, oop, cframe math, exploits (remote events making sure they arent explotiable), modulescript architecture, memory managment/perofrmance, asynchronous code

#

hes a beginner btw

sullen bay
#

i even wrote it out for him
if actionname == "Run" and inputState == Enum.UserInputState.Begin then
--running script
end
end
ContextActionService:BindAction("Run", Run, true, "w", Enum.KeyCode.S, Enum.KeyCode.DPadUp )--add other running buttons

idle shell
#

and u said he should immediately scrap all he has

idle shell
#

IF HES GOING TO IMPLEMENT SOMETHING ELSE

sullen bay
idle shell
#

HE NEVER SAID HES GOING TO USE IT ALL FOR SCRIPTING

#

god you idiot bro

sullen bay
#

U dont even know how CAS works LOLL

idle shell
sullen bay
#

UR A IDIOTTT

#

LOLLL

idle shell
#

people like this ruin rsc

sullen bay
#

now I know u have no clue what ur talking about LOLL

idle shell
#

and lets say he wants double tapping H to heal

#

new function OR clog up his current function

sullen bay
#

just quiet down, ur a dumbo, u don't know what ur talking about

idle shell
#

u just noticed u lost the argument and are trying to change the topic

idle shell
#

yep he isnt even trying to refute me

#

just dropped the argument

idle shell
#

why do people do this when they lose?

#

are they salty

sullen bay
#

why is he going to need a new function if he wants to use A not W?

#

lets flesh it out

#

lets see who is right or wrong

#

does @idle shell know what he's talking about or not?

#

lets find out!

idle shell
sullen bay
#

healing??

#

what function does he have with HEALING??

#

LOLL

sullen bay
#

How does he need a different function when he changes his keys from W to A To run that said function using CAS?

#

lol u know u lost and stopped typing, what a sad existence LOL

idle shell
idle shell
sullen bay
idle shell
#

HYPOTHETICAL

sullen bay
#

So

idle shell
#

HYPOTHETICAL

#

HYPOTHETICAL

#

HYPOTHETICAL

sullen bay
#

IN CAS

idle shell
#

ur so dumb bro

sullen bay
#

So he wants to change his Key from W to A?

#

here's what u do with CAS

#

ContextActionService:BindAction("Run", Run, true, "w", Enum.KeyCode.S, Enum.KeyCode.DPadUp )--add other running buttons

idle shell
sullen bay
#

ContextActionService:BindAction("Run", Run, true, "a", Enum.KeyCode.S, Enum.KeyCode.DPadUp )--add other running buttons

#

there done

idle shell
#

.Keycode.W --> .Keycode.A

sullen bay
#

where's this new function?

idle shell
idle shell
#

let me talk here

#

no

#

shut up

#

let me talk

#

shut

sullen bay
idle shell
#

dumbass listen rq

#

yo dumbass

sullen bay
#

I dont let idiots interrupt me

idle shell
#

time to zip it

#

i said

sullen bay
#

Jump function, Grappling function, sliding function, adding player customizable inputs, etc

#

CAS does this

idle shell
#

if he wants a heal function for the key H being double clicked. what does he do? he makes a new function regardless of CAS to implement healing

sullen bay
#

Mobile support? console?

idle shell
sullen bay
chilly merlin
#

With no context at all @sullen bay you're wrong asf

chilly merlin
#

Bye

idle shell
#

another one

#

LOL

idle shell
#

LMAOOOO

sullen bay
#

no context

chilly merlin
idle shell
#

he took one look and knew u were wrong

sullen bay
chilly merlin
#

Of last message

idle shell
#

lets keep it between me and u moron

sullen bay
idle shell
#

ironic how?

sullen bay
idle shell
#

100 times uve said ironic not 1 made sense

idle shell
#

LOL

#

its discord kid

#

"this is my private argument! 🤓 "

sullen bay
idle shell
sullen bay
sullen bay
#

I just changed the function name and input key

chilly merlin
#

Bye now

sullen bay
idle shell
#

mobile support? add a button --> connect function to his current double tap script

#

console? iskeydown buttonr2 -- > use his already made function

#

5 mins

#

max

#

or spend an hour learning about CAS

sullen bay
#

just have the context somewhere ez, do the samething , takes 2 seconds

chilly merlin
#

Make him learn both icl

#

Fix own script

idle shell
chilly merlin
#

Learn acs

#

Cas

#

Whatever the fuck it is

sullen bay
idle shell
#

ive never seen "pipeitupwho" in RSC

#

go back to Roblox Studio Friends House or whatever 200 member server ur in

chilly merlin
#

Ty

sullen bay
chilly merlin
#

Also I trust more an active member that's s1

sullen bay
chilly merlin
#

Then a guy with fucking tree

#

As pfp

idle shell
chilly merlin
idle shell
#

when will they release the ranking tickets

idle shell
sullen bay
#

im done wasting my time, method I brought up is more efficient and works better.

idle shell
steel inlet
#

ContextActionService is perfectly fine and good

idle shell
steel inlet
#

if you for some reason don't like it, there are still ways to do it better than shitloads of conditionals

idle shell
#

Hehad to rewrite his script to detect double clicking + if he constantly drops what he knows he will be burdened

#

He JUST learns something just for someone to say "drop it this sucks"

steel inlet
#

I mean, yeah, and?

idle shell
#

Simple, without rewriting sm else

steel inlet
#

that's great, but it's also about to be deprecated

idle shell
#

And its simpler for him because he could stick with his own script. He never asked for alternatives or "teach me how to do it better"

#

He simply showed us his script and asked how can i add other keys

#

Not critisize my script for unefficiency and demand i do it better

steel inlet
#

criticize*, inefficiency*

in any case, your point here is invalid when used against the push for efficiency

thorn rampartBOT
#

studio** You are now Level 26! **studio

steel inlet
idle shell
idle shell
#

LOL

#

Im calling u a nerd for that

steel inlet
idle shell
steel inlet
idle shell
#

3 weeks to learn about uis and how to implement it just to learn about CAS (and UIS wont be deprecated u moron)

steel inlet
#

choose your words very carefully

idle shell
steel inlet
#

you are practically weaving a web of contradiction

idle shell
#

No meaningful progress on scripting knowledge will be gained

idle shell
#

You need to understand what im insinuating not take the literal meaning

steel inlet
#

why would you assume I'm christian?

idle shell
#

Because they call the non contradictions in every book contradictions

#

They dont know what context is

steel inlet
#

if I don't take the literal meaning, what am I supposed to go on

steel inlet
idle shell
#

Stop criticising the small things acting like ur smart and stick to the argument

steel inlet
idle shell
idle shell
#

You already have knowledge so you have nothing to do BUT relearn better ways

steel inlet
#

Isn't it funny how you have to first understand the idea behind logical statements to know how to use them? If he truly missed that fact and you had to give it to him, I'm afraid that is more against your argument than for it

idle shell
#

Are you changing the topic

#

This is completely unrelated

steel inlet
#

sorry, instead of "logical statements" I should say "conditional statements"

#

does that fix it

#

the original code he provided has this whole double key press thing implemented already

#

isn't it ODD that he didn't think to reuse it

idle shell
#

Whats ur point

steel inlet
# idle shell Whats ur point

Now I truthfully don't take people to be dumbasses, but either he is one or he really just wants to get the job done

#

it's always better it get the job done better, yes?

idle shell
#

Whos a dumbass and whats going on

#

I dont understand u

steel inlet
#

right, let me be clear that the context is about his code

#

pronouns? he? (Not you)

idle shell
#

His code sucks

#

I know

#

But it works

steel inlet
#

it works, but that's not my point

#

my point is this: he failed to see the practicality behind reusing it

#

he asks here for something he himself figured out? or, so you would like to make it out

idle shell
#

Yes he didnt know to reuse it

#

Thats why i called him a dumbass

steel inlet
# idle shell Thats why i called him a dumbass

in essence, I don't think that this is a learning experience for he; just a place for he to get an answer

in other words, it would be silly to think that the priority should be to give him something he can comprehend based on a copy of what he has neglected to reuse

#

🤷

idle shell
steel inlet
#

that intent I can agree on

idle shell
#

Thats why I gave him something to comprehend because it aligns with what i said above

steel inlet
#

However I cannot agree with your intent to give him something to comprehend, because in my professional opinion, people who refuse to learn are not worth the effort of a soft upbringing

idle shell
steel inlet
#

Just a personal thing tho

ionic marsh
native elk
#

its the thing these guys been yapping about

weary light
#

Advanced Roblox Scripting Tutorial #26 - ContextActionService (Beginner to Pro 2020)

Hey guys! Welcome to another Roblox scripting tutorial. In today's video I am going to be teaching you about ContextActionService. This is how you create custom mobile roblox buttons on mobile. It's similar to UserInputService but is useful when you want to ju...

▶ Play video
#

youll need it

ionic marsh
#

I think that i better go it the simple, idk, all this make me understand that Is better if I just make the entire map first and then the script ;-;

weary light
#

if you wanna make things simple dont make it advanced

ionic marsh
#

and I have the movement almost done, like 99%

ionic marsh
#

Il just send the animation and the double tap W in action