|
| 31 Jul 2015 09:08 AM |
| I'm making a door that openes when your mouse goes over it and you press a key on your keyboard. I've made the door and CFrame scripts but I have no idea on how to make it so the script in the door recognises that it has been activated. |
|
|
| Report Abuse |
|
|
| |
|
|
| 31 Jul 2015 09:16 AM |
Check out this page: http://wiki.roblox.com/index.php?title=Keyboard_input
VB.NET, C#, C++, PHP and much more |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2015 09:36 AM |
| Ok, thank you for the reply. I'd already seen the wiki page but as usual I missed the important bits! For this to work you would have to have an 'interaction script' that activated the door from a script in the charactor, correct? I understand how this would work however, for education's sake, is there a more efficiant way to do this? |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2015 09:49 AM |
| I'd also like it so that when I mouse over the button the script is active. How would this work? |
|
|
| Report Abuse |
|
|
| |
|
|
| 31 Jul 2015 10:20 AM |
wat u mean when u hover your mouse over a door, the script is active u mean enabled from disabled? |
|
|
| Report Abuse |
|
|
Fribet
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 700 |
|
|
| 31 Jul 2015 10:24 AM |
| http://wiki.roblox.com/index.php?title=Keyboard_input |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2015 10:26 AM |
| I mean that when I put my mouse over the button/door the script will then allow me to press a key to open it. |
|
|
| Report Abuse |
|
|
Fribet
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 700 |
|
|
| 31 Jul 2015 10:26 AM |
| http://wiki.roblox.com/index.php?title=API:Class/Mouse |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2015 10:26 AM |
| I've already looked at that, Fri and I understand it. |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2015 10:27 AM |
| Alright, I'll look at the mouse api |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2015 10:30 AM |
| Could I use mouse's target property in some way? |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2015 10:45 AM |
| Could you use the target property of the mouse to find a button and then run the ":BindActionToInputTypes"? Is there a better way of doing this? |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2015 04:25 PM |
1. Check if target of mouse is not nil. 2. Keep the script waiting until input from the user is received.
VB.NET, C#, C++, PHP and much more |
|
|
| Report Abuse |
|
|