Yes, I know this event is from central hub, but I wanted to make them work on online servers too, I got them to load, and they function fine, but only on the host. It doesn't matter who triggers it, or even who planted the brick.
registerOutputEvent("GameConnection", "GoToMainMenu");
registerOutputEvent("GameConnection", "StartServer");
registerOutputEvent("GameConnection", "JoinServer");
registerOutputEvent("GameConnection", "OpenOptions");
registerOutputEvent("GameConnection", "QuitGame");
registerOutputEvent("GameConnection", "OpenModManager");
registerOutputEvent("GameConnection", "OpenIRCClient");
function GameConnection::GoToMainMenu(%this)
{
disconnect();
}
function GameConnection::StartServer(%this)
{
canvas.pushDialog(StartMissionGUI);
}
function GameConnection::JoinServer(%this)
{
canvas.pushDialog(JoinServerGUI);
}
function GameConnection::OpenOptions(%this)
{
canvas.pushDialog(OptionsDlg);
}
function GameConnection::QuitGame(%this)
{
quit();
}
function GameConnection::OpenModManager(%this)
{
canvas.pushDialog(RTB_ModManager);
}
function GameConnection::OpenIRCClient(%this)
{
canvas.pushDialog(RTB_IRCClient);
}
This is the code from events.cs