Trainz-mp Главная | Форум trainz-mp.ru | Обратная связь (Ваш вопрос, Создание пакетов) На наших часах: 21.05.2024 23:28:08

Здравствуйте Гость ( Войти через форум ) Авторизовавшись Вы сможете загружать сюда любые зависимости формата .CDP для игры Trainz Куиды Поиск

Репозиторий

<kuid2:76656:80011:1> Morse Code etc Script Library

Тип: Библиотека
Опубликовано: 16.07.2020 18:47:20
Скачиваний: 17
Размер: 20.6 kB

Скачать

Script Library for Morse Code and Marine Buoy light flashes for use by scripters.
If you are building an asset requiring coded lighting flashes, (eg- Airport Morse Beacon or Marine Navigation Buoy), this library will flash that code to the light in your asset.
Your forwarding asset script must send the correct asset and corona info to this library. See below.

Forwarding object should send 4 string types and 2 object types.
LibStrings[0] = The name of the corona lighting effect in your config file.
LibStrings[1] = Letter(s) or number(s) you want to see flashing, separated by a comma if more than one.
LibStrings[2] = A string saying 'On' or 'Off' only!
LibStrings[3] = A float number as a string specifing the duration in seconds of required 'dot' length.
Objects[0] = Your asset.
Objects[1] = The name of the corona texture 'Asset' you are using and have declared in your script.
Codelib.LibraryCall = Flashlib is the name of the Library variable you need to declare in your script to point to THIS asset. You may designate any name here.
('Flasher', LibStrings, Objects) = 'Flasher' is the function call in THIS asset. This name cannot be changed.
(Note - All the inverted commas in the example below should in fact be double commas!)

string[] LibStrings = new string[4];
GSObject[] Objects = new GSObject[2];
LibStrings[0] = 'light';
LibStrings[1] = 'A,B,C';
LibStrings[2] = 'On';
LibStrings[3] = '0.5';
Objects[0] = me;
Objects[1] = Light;
Flashlib.LibraryCall('Flasher', LibStrings, Objects);

Individual letters or numbers entered in LibStrings[1] will encode to Morse Code. Each character should be sent as a separate element, separated by a comma.

In addition, special multi-character codes exist for Marine Buoys.
Sending LibStrings[1] = 'NC'; (or 'SC' or 'EC' or 'WC') will provide correct flashing for N,S,E & W Cardinal Buoys.
Sending the letters, 'GPFL' as the first element, followed by a number for the next and subsequent elements will produce Group Flashes.
eg - LibStrings[1] = 'GPFL,1,2'; will produce 1 flash followed by 2 flashes, (repeated).
Sending the letters, 'OC' as the first element will produce occulting flashes. ie - light is on and 'flashes' are dark.
Sending LibStrings[1] = 'OC,2'; will produce occulting morse code for the number 2.
Sending LibStrings[1] = 'OC,GPFL,1,2'; will produce occulting 1+2 flashes.

Note that sending any multi-character elements other than those above or any characters other than plain letters or numbers, will result in an unrecognised character Exception.

The MAXIMUM number off your assets this Library will accept is 59. After that you will have to clone this asset.


config.txt:

Файлы:
flash.gs 5.7 kB
screen.jpg 15.6 kB
Общий объём файлов: 21.4 kB

Версии элемента:
kuid kind name build date size
<kuid2:76656:80011:1> library Morse Code etc Script Library 2.9 16.07.2020 18:47:20 20.6 kB

Зависимости:
kuid author kind name build date size
Нет

Зависимые элементы:
kuid author kind name build date size
<kuid2:76656:28101:5> #76656 buildable SC 2012 SCC 2.9 23.07.2020 21:08:47 72.5 kB
<kuid2:76656:28102:5> #76656 buildable SC 2012 SCE 2.9 23.07.2020 20:29:43 74.0 kB
<kuid2:76656:28103:5> #76656 buildable SC 2012 SCW 2.9 23.07.2020 20:45:03 72.3 kB
<kuid2:76656:28104:5> #76656 buildable SC 2012 CLK 2.9 24.07.2020 19:38:00 67.4 kB
<kuid2:76656:28105:5> #76656 buildable SC 2012 EPD 2.9 23.07.2020 21:09:11 67.1 kB
<kuid2:76656:28106:5> #76656 buildable SC 2012 FST 2.9 23.07.2020 20:57:23 70.8 kB
<kuid2:76656:28107:5> #76656 buildable SC 2012 TTJ 2.9 23.07.2020 21:04:14 70.6 kB
<kuid2:76656:28108:5> #76656 buildable SC 2012 VAL 2.9 23.07.2020 20:03:16 66.5 kB
<kuid2:76656:28109:5> #76656 buildable SC 2012 EPL 2.9 23.07.2020 20:07:43 64.1 kB
<kuid2:76656:28110:5> #76656 buildable SC 2012 BTJ 2.9 24.07.2020 19:37:28 65.7 kB
<kuid2:76656:28111:5> #76656 buildable SC 2012 GTJ 2.9 23.07.2020 19:14:28 62.7 kB
<kuid2:76656:28112:5> #76656 buildable SC 2012 BCL 2.9 23.07.2020 20:33:31 65.4 kB
<kuid2:76656:28113:5> #76656 buildable SC 2012 MLG 2.9 23.07.2020 19:30:33 64.3 kB
<kuid2:76656:28114:5> #76656 buildable SC 2012 MLS 2.9 23.07.2020 20:03:09 67.3 kB
<kuid2:76656:28115:5> #76656 buildable SC 2012 CLJ 2.9 23.07.2020 20:37:18 70.8 kB
<kuid2:76656:28116:5> #76656 buildable SC 2012 LPJ 2.9 23.07.2020 21:04:56 69.5 kB
<kuid2:76656:28117:5> #76656 buildable SC 2012 CHJ 2.9 23.07.2020 21:06:52 60.3 kB
<kuid2:76656:28118:5> #76656 buildable SC 2012 BCS 2.9 5.10.2023 17:58:34 60.4 kB
<kuid2:76656:28119:5> #76656 buildable SC 2012 BCU 2.9 2.08.2020 9:50:59 69.5 kB

Яндекс.Метрика


Powered by AKR © Камиль Ахметзянов aka kemal, 2011 - 2024