Jump to content

How to make an notification on the server?


Sawich

Recommended Posts

There are a some different calls you can make that I am aware of depending on who you want to send the notifications to.  Some objects like the sector have a "broadcastChatMessage" method to send a message notification to everyone in the sector.  If you want to see some examples, look in the file data/scripts/events/traderattackedbypirates.lua to see the various messages broadcasted out by the random event of pirates attacking a transport.

 

Then there are objects like the player object with a "sendChatMessage" method to send a more targeted message.  Strangely, the event for random xsotan attacks uses player directed messages in data/scripts/player/events/alienattack.lua, which is why in multiplayer only one player gets notice before the xsotan pop into the system.

 

One of the parameters of these methods then controls the type of message, whether it's an error message, informational, or treated like a text message from someone.

Link to comment
Share on other sites

Then there are objects like the player object with a "sendChatMessage" method to send a more targeted message.  Strangely, the event for random xsotan attacks uses player directed messages in data/scripts/player/events/alienattack.lua, which is why in multiplayer only one player gets notice before the xsotan pop into the system.

 

This may be because the event is player specific. As with single player if you leave the sector the event will still follow you, probably whoever is getting the messages on multi if they were to leave the sector it’ll follow them.

 

Really wish they’d change this behavior....

Link to comment
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

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...