MapObject Messages

From TrainzOnline
Revision as of 23:59, 3 February 2010 by Windwalkr (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  • MapObject,View-Details is issued when the user right clicks on a mesh object and selects View-Details from the menu which the game presents.
  • Some objects, such as trains, vehicles and industries, present a browser in response giving information about the selected objects and sometimes allowing a measure of control in Driver.
  • Where the selected object does not use the message it can be intercepted in script to call up a user defined browser window allowing command links to be inserted.
  • To do this, define a handler to start a browser
AddHandler(me,"MapObject","View-Details","ViewDetailsHandler");
void ViewDetailsHandler(Message msg) {
  StartViewDetailsBrowser();
}
  • MapObject,View-Schedule provides a similar facility for vehicles which have an associated timetable.


See Also

Personal tools