ID:170176
 
Well, my basic plan for a new type of chat, is one in a statpanel! What I have so far >>
client
var/message
mob
Login()
usr.name = input("Name please", "Tests")

mob
verb
Say(msg as text)
client.message = "[msg]"//w/e, Ill edit this =\

Stat()
statpanel("Chat Box")
stat("Message:","[client.message]")


BUT, does anyone know how to make it, so when a new message pops up, the Message:, box l;owers down a space, a NEW message pops up, and it repeats?

Kinda like
Message: Blah
NEW
Message: Poo
Use a list instead. I declared mine off of /mob, though. Meh. Anywho, you really need to make sure you have ..() in Login(), it won't complete the process if you don't. This just uses the list in a stat() proc. I also made a World Chat panel for global chatting, and made the Chat Box in view() only, to give you an idea of how that would work.

mob
var/list/messages
var/panel = "local"
verb
SwitchChat()
if(src.panel == "global")
src.panel = "local"
src.client.command_text = "Say "
src.client.statpanel = "Chat Box"
src << "You're now speaking on the local channel"
else
src.panel = "global"
src.client.command_text = "WSay "
src.client.statpanel = "World Chat"
src << "You're now speaking on the global channel"

Say(msg as text)
if(!msg) return

if(!messages) messages = new
messages.Insert(1,"[key]: [msg]")
if(messages.len>50)
messages = messages.Copy(1, min(51,messages.len))

for(var/mob/M in view())
if(!M.client) continue

if(!M.messages) M.messages = new

M.messages.Insert(1,"[key]: [msg]")

if(M.messages.len>50)
M.messages = M.messages.Copy(1, min(51,M.messages.len))


WSay(msg as text)
if(!msg) return
if(!Messages) Messages = new
Messages.Insert(1,"[key]: [msg]")

if(Messages.len>50)
Messages = Messages.Copy(1, min(51,Messages.len))

Stat()
statpanel("Chat Box")
stat(messages)

statpanel("World Chat")
stat(Messages)


~X

[edit] bugz0rz