Each signal costs a small amount of money) Convenient on longer stretches of track! (The tool even lets you change the spacing - if you want a signal every four squares, or five, or eight. There is a multi-signal tool which lets you place several signals evenly spaced out.
MASHINSKY SIGNAL TUTORIAL MANUAL
You can change to manual selection as well as one-click one way signals in Game Settings. The game defaults to automatically selecting which type of signal to place, as well as defaulting to two-way signals. Yes, this might at first come across as slightly difficult, but zoom in and you'll soon get the hang of it. You decide which way a one-way signal will orientate by which side of the track you click.
If a block is occupied by a train then the signal dividing these blocks won't allow any other train to enter that occupied block until this block is cleared. Signals prevent trains from crashing into each other while driving on the same track and it is for this reason that they are an important part of any railway system - safety first guys!Ī signal divides a railway line into two sections known as blocks. 4.4 Correct use of bi-directional signals.
MASHINSKY SIGNAL TUTORIAL CODE
The code is just there to give you an idea of the environment in which signals work.)Īll content is copyright by and cannot be used without permission. In other words, don't complain to me about why it's lame to use inc -u for flood protection etc. Questions, comments, flames can be sent to The code examples above are strictly conceptual and are in no way meant to be copied and pasted as working script. Hopefully this has shed some light on the concept of Signals and mIRC event handling. In closing, there isn't much to the syntax of Signal Event handling, but there is a wealth of potential for a creative scripter.Īs well as the above MTS example, possible uses for signals could include: The above example shows how one could handle a range of signals dynamicly. It returns the value of the calling signal. In this example we introduce both a wildcard signal definition, and the $signal identifier. Instead of having:Īnd then having to run script after the parse in another file, you can simply create a signal based engine and pass along the event handling without any conflicts: MTS takes over all visual event handling, and often causes conflicts within scripts. Let's move on to a more beneficial example: a theme engine. The less one event has to do, the faster it will do it. While this example might seem trivial, it illustrates an important concept. Using /signal you can set off multiple triggers at the same time, without slowing down the event: mIRC script is executed IN ORDER before following lines can be processed. The extra lines of code now slow down the rest of the event. Normally you would just add them to the event: Maybe some logging and counter functions. So now lets say that you want to add some features to your flood protection script. What good is a flood protection if it's slow? In a situation such as this, the speed of the script is essential to it's function.
This example kicks the $nick from the channel when the variable reaches a certain value in a certain period of time.
For example, let's say that you have a channel flood protection script: Standard mIRC event handling creates conflicts in a modular environment. In other words you can create custom events based on existing events/situations. Note: The script that called /signal is triggered first, and then all other scripts are triggered." The $1- identifier returns the parameters that were specified in the /signal command. The $signal identifier returns the signal name that caused the signal event to trigger. The on signal event triggers if a script has used the /signal command to send a signal to all scripts. You can however use -n to make the script trigger immediately. The signal command allows you to trigger signal events in all scripts that listen for signals.īy default the signal is triggered after all current scripts have finished executing. "Signals are simple way of triggering signal events in multiple scripts at the same time." So just what is /signal? Signals are simply another level of event handling to prevent conflicts between scripts. This tutorial assumes working knowledge of basic mIRC event scripting, aliases, and basic scripting concepts such as wildcards.