Objects that react to mouse clicks

Nellodd

New member
Good morning everyone, I was thinking about a kind of object that reacts to the mouse click by sending a sort of message like "Object"(major), "LeftMouseClick"(minor) that I could use with AddHandlet to call a routine that executes something..
 
currently I can do this using objects with class "buildable" that react to ctrl+rmb generating the message "mapobject", viewdetail" but it's not the nicest way... The purpose of the object I have in mind could be, when clicked: a) start an animation.. b) move the switches c) change the appearance of the traffic lights does anyone have an idea of how to use the trainzscript language for this purpose??? all help is welcome
 
Back
Top