...InfaBacon...

System text

7 posts in this topic

a mod where you can type in a message that is shown in the chat as a system message :)

0

Share this post


Link to post
Share on other sites

only possible for your side.

other may either not see it or it looks like you send it.

 

y?

cuz the system messages are handled clientsided

 

0

Share this post


Link to post
Share on other sites

This are all possible ways of sending a message i know maybe one of them the is right one you are looking for.

Spoiler

-- SHOW HINT
 function showHint(msg)
  if not managers or
   not managers.hud then
   return
  end
  managers.hud:show_hint({text = msg})
 end
 
-- SHOW CHAT MESSAGE    
 function ChatMessage(message, username)
  if not managers or
   not managers.chat or
   not message then
   return
  end
  if not username then
   username = managers.network.account:username()
  end
  managers.chat:receive_message_by_name(1, username, message)
 end
 
-- OUTPUT MESSAGE
 function output( message )
  local outputMessage = "[" .. os.date("%H:%M:%S").. "] " .. message .. "\n"
  local logFile = io.open("output.log", "a")
  io.write(outputMessage)
  logFile:write(outputMessage)
  logFile:close()
 end
 
-- SHOW SYSTEM MESSAGE
 function SystemMessage(message)
  if not managers or
   not managers.chat or
   not message then
   return
  end
  managers.chat:_receive_message(1, managers.localization:to_upper_text( "menu_system_message" ), message, tweak_data.system_chat_color)
 end
 
-- SEND MESSAGE
 function SendMessage(message, username)
  if not managers or
   not managers.chat or
   not message then
   return
  end
  if not username then
   username = managers.network.account:username()
  end
  managers.chat:send_message(1, username, message)
 end
 
-- SHOW MID TEXT
 function show_mid_text(msg,msg_title,show_secs)
  if managers and managers.hud then
   managers.hud:present_mid_text( { text = msg, title = msg_title, time = show_secs } )
  end
 end
 
-- CONSOLE TEXT
 function Console(text)
  io.stderr:write (text .. "\n")
 end
 
-- FADING MESSAGE
 function Fading(message,color)
  if managers and managers.mission then
   if not color then
    color = Color.red
   end
   managers.mission._fading_debug_output:script().log(message,color)
  end
 end

 

 

0

Share this post


Link to post
Share on other sites
On 12/11/2015, 10:16:41, Sanguin said:

Tested cuz i have read somewhere that this the system tag only applyes to yourself not to others

1.So, which ones of them work?

2. Also, if I put it in as userscript, how do I get it to say something in game?

3. Also, is it possible to change it so everything you write in chat automatically appears at system text?

0

Share this post


Link to post
Share on other sites
vor 3 Minuten, SuperKad said:

1.So, which ones of them work?

2. Also, if I put it in as userscript, how do I get it to say something in game?

3. Also, is it possible to change it so everything you write in chat automatically appears at system text?

1. i forgot a question mark in ma answer right behind tested but they look working

2. those he provided are just functions so you have to call these functions like if you want to let sth appear like it was an system text (3) put the code he provided in the userscript and add the line at the bottom with:

SendMessage("This is dem text you want to output","System")

 

1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Stop being a peeping tom and join the community.... we got cookies


Join the crew now

Sign in

Already part of the crew? Board right here


Sign In Now