![]() |
Detecting if the chatbox/chat field is open.
You know how UN has that typewriter script? I'm trying to create a script that detects if the chat box is open and the player is typing (anything), and displays an emote to show that the player is typing. though i cant seem to find the functions that detect this. anyone know where i could find a list of functions or whatever that check for these? or if youve found them somewhere in the wiki, could you link me to it?
|
ChatBar is the GuiTextEditCtrl; you can use events like onShow to display the bubble.
|
ChatBar.visible = true;
I used something like this to detect if it's open HTML Code:
//#CLIENTSIDE |
I believe that I used ChatBar.visible on N-Pulse a while back when I added the emote-chat bubble there. Some people don't like these types of things, but I personally think it's a nice little feature; sort of like how most instant messengers tell you when the person you're conversing with is typing.
|
cbk already said but what it comes down to is:
PHP Code:
http://wiki.graal.net/index.php/Crea...ent/GuiControl |
Quote:
ChatBar.onShow() is only evoked once each time that the ChatBar becomes visible. This can lead to the emote glitching in cases where the player is warped around while chatting (could be that they are waiting for an event to start and the ET warps everyone to the event while some are mid-chat), and probably other instances as well (like spar waiting queues and such). |
Quote:
|
Thanks guys. i got it working last night using andy's example. and thanks for the link jer :D now all i need to do is find out how to make the emote image i made act like an actual emote instead of making a seperate gani for each gani the player triggers it in :p
|
Set player.attr[30] to whatever gani you would like to show. You can choose any number up to 30 but make sure none of your ganis are using the attribute that you set it to.
|
All times are GMT +2. The time now is 08:49 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.