Dad_BotJoin Date: 2011-06-27 Post Count: 1055 |
Where would I go or how would I go about disabling the arrow keys for movement? I want all of them to be disabled because they are going to have different controls for my game.
|
|
|
i made a quick CoreScripts GitHub search for you and found the arrow control keys are on line 109 of the KeyboardMovement script
KeyboardMovement is located in StarterPlayer>StarterPlayerScripts>ControlScript>MasterControl>KeyboardMovement
you can look at line 109 and comment out the ContextActionService lines that control players arrow movement
|
|
Dad_BotJoin Date: 2011-06-27 Post Count: 1055 |
I can't access these scripts unless I play test the game, how would I set that up in the regular studio editing?
|
|
hboogy101Join Date: 2011-04-10 Post Count: 1392 |
dude it can save just do it
lmad has the most threads ._. |
|
Dad_BotJoin Date: 2011-06-27 Post Count: 1055 |
i did that but it didn't save the script.
|
|
Dad_BotJoin Date: 2011-06-27 Post Count: 1055 |
figured it out but the guy above was wrong about how to disable arrow keys
|
|
|
Step 1) Play game in Studio Step 2) Open LocalPlayer Step 3) Open PlayerScripts Step 4) Copy "ControlScript" Step 5) Paste it into Lighting or something like that and edit it to your likings Step 6) Make a script to delete old control script Step 7) Replicate the new ### #### ################ ##### of the old one Step 8) Profit. |
|
Dad_BotJoin Date: 2011-06-27 Post Count: 1055 |
i got that part down but i cant find where to disable arrow keys
|
|
SmeersJoin Date: 2013-02-14 Post Count: 797 |
I'd just search for its' KeyCode using CTRL+F, and if you can't find which scripts, use the Find in All Scripts feature that Studio has built in.
|
|
|
yea i provided the correct keybinds but a non-working solution. those keybinds disable both WASD and arrow movement.
the only way to "disable" arrow movement is by using UserInputService and checking if user pressed the arrow keys and then setting their walkspeed to 0 and back to default 16 after they released arrow keys
both UP and DOWN arrow keys are equivalent to W and S keys because they're both part of CharacterForward and CharacterBackward movement in player actions
http://wiki.roblox.com/index.php?title=API:Enum/PlayerActions
the lines i gave you use that enum. you can also see a comment on line 109 by one of the developers about arrow movement:
-- TODO: remove up and down arrows, these seem unnecessary
|
|
Dad_BotJoin Date: 2011-06-27 Post Count: 1055 |
what about disabling the left and right arrow keys to move the camera
|
|
|
You actually can do that. I just tested in in Studio and was able to disable the Right/Left keys for turning camera.
To disable them, you need to get the RootCamera modulescript and comment out 1026-1029 and replace the 'elseif' on line 1030 with an 'if'
Then you also need to comment out lines 1056-1062
That will fully disable the arrow keys for camera movement.
You can also look at the other keybinds in the entire function starting from line 1013 and disable some of the other keybinds like the 'I' and 'O' keys for zooming in and out, and the keys for turning camera.
|
|
Dad_BotJoin Date: 2011-06-27 Post Count: 1055 |
thanks
|
|