|
| 23 Feb 2015 10:05 AM |
Hi,
I need to know at the beginning of running a localscript, if the users chatbar is selected. In other words, if he is typing a message or simply selected the chatbar for typing.
Is there a way to do this? I found none sofar :/ |
|
|
| Report Abuse |
|
|
Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
|
| 23 Feb 2015 10:09 AM |
| I don't think you can access any events or properties of coreguis. |
|
|
| Report Abuse |
|
|
SLY3
|
  |
| Joined: 10 Jul 2008 |
| Total Posts: 1700 |
|
|
| 23 Feb 2015 10:14 AM |
| I don't think there's a way to do it with roblox's default chat bar. Make a custom chat system, and then you can use roblox's TextBox (which allows you to see if it's selected) |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 10:54 AM |
| Why not use the KeyDown event for the key "/" to check if they are typing. And, you can make an invisible TextButton, with the size and position of the normal chatbar, and use the MouseButton1Click event to see if it was interacted with. |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 10:57 AM |
local plr = game.Players.LocalPlayer local mouse = plr:GetMouse()
mouse.KeyUp:connect(function(k) if k == "/" then print("This user is now chatting") end end) |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 10:58 AM |
@warspyking
Ew, Use InputService
Give me 15 Robux I give you print("Give me 15k") |
|
|
| Report Abuse |
|
|
SLY3
|
  |
| Joined: 10 Jul 2008 |
| Total Posts: 1700 |
|
|
| 23 Feb 2015 11:21 AM |
| But some idiots use the mouse button to click the chat bar, so that'd be too un-reliable. |
|
|
| Report Abuse |
|
|
SLY3
|
  |
| Joined: 10 Jul 2008 |
| Total Posts: 1700 |
|
|
| 23 Feb 2015 11:23 AM |
"And, you can make an invisible TextButton, with the size and position of the normal chatbar, and use the MouseButton1Click event to see if it was interacted with."
You can put guis over roblox's hud? :O |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 11:24 AM |
| You joined on my moms birthday in 2008. :o |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 11:25 AM |
@sly
No, I think CoreGUIS always have the benefit when it comes to ZIndex. |
|
|
| Report Abuse |
|
|
SLY3
|
  |
| Joined: 10 Jul 2008 |
| Total Posts: 1700 |
|
|
| 23 Feb 2015 11:26 AM |
| That's what I thought before, so I guess the only way is to make a custom chat system. |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 11:26 AM |
| Anyways, to do this I recommend using "hax" to get the CoreGUI for "Chat" and making a fake chat bar, but it would still be functional? Basically cloning it and then using an event to see if it's active. |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 11:31 AM |
You don't need to use "hax" to get CoreGui's
https://github . com/ROBLOX/Core-Scripts
Give me 15 Robux I give you print("Give me 15k") |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 23 Feb 2015 11:42 AM |
| As everyone has mentioned, there is no inherent way of getting if the user has the chat bar selected without using 'hacky' methods. Your best chance is in making a fake chat bar or checking for differences in the mouse input and UIS |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 12:13 PM |
You don't need UIS to see if it is selected though, do you? (I didn't read the above posts much) You can just use the event that I thought existed on TextBoxes? |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 12:14 PM |
| @Jarod, yeah... I don't know why people want to use UIS. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 23 Feb 2015 12:17 PM |
That's why I said or.
Use a fake chat bar and use the event, or keep the current one and use UIS and Mouse differences to determine. |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 12:20 PM |
You could keep the current one and see if they press "/" and then also checked the Mouse's Y position then check the Mouse Click.
Give me 15 Robux I give you print("Give me 15k") |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 02:34 PM |
Thing is, the chatbar might already be selected when the script starts running and THAT is when I need to know if its originally selected or not.
I tried the "hax" method: local CoreGuiService = game:GetService('CoreGui') local chatbar = CoreGuiService.RobloxGui.Chatbar print(chatbar) As I believe i read on the wiki, this section yields an error if tried to be used.
Guess there is no solution.. |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2015 03:54 AM |
THANK GOODNESS! Roblox added PlayerScripts (still not enabled tho) With it I can keep localscripts that runs even when player dies! Goodeh! GOOODEH! :D Exacly what I need! |
|
|
| Report Abuse |
|
|
VoltiCoil
|
  |
| Joined: 20 Nov 2008 |
| Total Posts: 1227 |
|
|
| 13 Apr 2015 02:16 PM |
| If you still need a method for this, PM me. I have a method of solving this using the userinput event. |
|
|
| Report Abuse |
|
|
lokkut
|
  |
| Joined: 18 Mar 2009 |
| Total Posts: 1794 |
|
|
| 13 Apr 2015 02:21 PM |
http://www.roblox.com/games/228768346/lokkuts-Place-Number-216
like this? |
|
|
| Report Abuse |
|
|
VoltiCoil
|
  |
| Joined: 20 Nov 2008 |
| Total Posts: 1227 |
|
|
| 14 Apr 2015 02:33 AM |
| No, detecting when the chat is actively in use. Not a chat gui.... |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 14 Apr 2015 02:37 AM |
"THANK GOODNESS! Roblox added PlayerScripts (still not enabled tho) With it I can keep localscripts that runs even when player dies! Goodeh! GOOODEH! :D Exacly what I need!"
It was actually active for like 3 days, must have been full of bugs lol.
I script -~ chimmihc |
|
|
| Report Abuse |
|
|
oldroland
|
  |
| Joined: 04 Jul 2008 |
| Total Posts: 44 |
|
|
| 14 Apr 2015 02:41 AM |
guise its script.parent learn h0w 2 scriptah liek da pr0
Bam. Easy. |
|
|
| Report Abuse |
|
|