-- chat_bubbles - Core logic, properties, and data for the Chat system -- (component of Chat System) -- Template attachment: chat_system -- Created by: Patrick Ferland -- Created on: 05/27/2008 -- Revision History -- 06/02/2008 P.Ferland - Initial release -- 06/09/2008 P.Ferland - Made bubbles player-draw instead of place-draw -- 07/22/2008 P.Ferland - Commented out script-sync -- 10/28/2008 P.Ferland - Removed obsolete object/script attach/detach code -- 10/30/2008 P.Ferland - OX friendliness pass -- Constants PLAYER_BUBBLE_SCRIPT = '11303:29' -- Script properties win_styles = { chat = 0, emote = 0, think = 0 } Define Properties() script_description = "Chat Bubbles" script_long_description = "Display comic book style chat bubbles overhead" chat_system_bubbles_enabled = 1 ExposeProperty('chat_system_bubbles_enabled', 'Enable chat bubbles?', 'checkbox') PersistProperty('chat_system_bubbles_enabled') chat_system_bubbles_offset = 100 ExposeProperty('chat_system_bubbles_offset', 'How far above objects do chat bubbles appear?') SetPropRange('chat_system_bubbles_offset', 0, 500) PersistProperty('chat_system_bubbles_offset') IncludeScript('11302:12') -- chat_utility IncludeScript('11302:8') -- chat_profanity end -- Commands -- no commands -- Triggers -- system trigger, fired when scipt is attached (in builder or world start) Trigger attach() -- Register scripts for loading chat_system_register_player_script(self, PLAYER_BUBBLE_SCRIPT) end -- system trigger, fired when scipt is detached Trigger detach() -- Unregister scripts chat_system_unregister_player_script(self, PLAYER_BUBBLE_SCRIPT) end