ID:155639
 
I've seen this done on a few games before, and I was wondering if it's possible to create a tab or button on the skin of a game so that it opens up a new window for chatting and such. I was also wondering if it would be possible to create different 'channels', so to speak, in which case different types of chat channels could be swapped out. For instance, a World Chat, Private Chat, Party/Team Chat, etc. These are just examples, I just need a chat for players that are within view of each other and a world chat.
Yea the Dm guide teaches u world say, say and whisper
ZaibTrain wrote:
I've seen this done on a few games before, and I was wondering if it's possible to create a tab or button on the skin of a game so that it opens up a new window for chatting and such. I was also wondering if it would be possible to create different 'channels', so to speak, in which case different types of chat channels could be swapped out. For instance, a World Chat, Private Chat, Party/Team Chat, etc. These are just examples, I just need a chat for players that are within view of each other and a world chat.



Also I think you're looking for winshow to open up the window, and U can put the Output interface in that new window.
Here's how I handle chat across multiple tabs. It's not terribly difficult.

You're going to need to be familiar with creating skins, and using output() in order to make this happen.

Create a Tab element on your main window (or wherever you want it), and two panes. Give each pane the ids world_pane and view_pane, and add an output to each. Give the outputs the ids world_output and view_output, respectively. Go back to the tab element you added to begin with and go to the Options tab. Add the two panes to the first box, and one of them to the second.

Now for a quick bit of code:

mob
verb
view_chat(msg as text) // Sends a message to everyone in view of usr!
for(var/mob/m in view(1))
m << output(msg, "view_output")

world_chat(msg as text) // Sends a message to everyone in the world!
for(var/mob/m)
m << output(msg, "world_output")

IIRC, output()ing to a mob without a client will give you a runtime.
In response to F0lak
I'm not all that experienced with working on skins, I've only made one or two, so I'm not incredibly savvy with all the commands and whatnot. What exactly is a pane?
In response to ZaibTrain
A pane is a special type of window that is meant to be rendered inside a child element or a tab element. They're created by creating a window, editing it, and under the second tab of the edit window, checking the box [] is a pane (not a main window).

More information on skins can be found in the skin reference and Lummox JR's Skin Tutorial.
In response to F0lak
Okay, I think I'm getting it now. But, I wanted the view_chat portion of the two channels to be on the main window, rather than a different window, so I changed that. However, from the start, the tab I used for the world_chat pane isn't showing the stuff like Statistics/Commands/etc. The world_pane appears to INSIDE the tab too, which is whack.

Edit- This is what it looks like when I run the game. I have a stat, inventory, and commands panel/tab programmed inside, but it's not showing up, and is instead showing the actual world_chat pane inside the tab. The output on the left is the view_chat output, by the way. http://oi51.tinypic.com/34ngkdi.jpg
In response to ZaibTrain
Man this is complicated.
In response to ZaibTrain
I feel bad triple-posting to bump, but I desperately need help with this.
help. desperate help required.