MapObject Messages

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
 
m (1 revision)
 

Latest revision as of 23:59, 3 February 2010

  • 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.


[edit] See Also

Personal tools