Clock Rule

kenwortht950

New member
Hi All
I am building a massive layout so far i have been working on it for 6 months but i want to use the animated clock. But is saying to go to the forums to find the code. Can anyone help me with this code.

Thank you:)
 
Hi All
.... i want to use the animated clock. But is saying to go to the forums to find the code. Can anyone help me with this code.....

Do you mean this: Clock Rule,<kuid2:62310:30041:1> ? (it's built in to TS2010 and I would think TS2009 as well).

I'm not exactly sure what your problem is - are you getting the "go to the forums" message when you add/edit it in Surveyor?
 
Clock.gs

The description in the clock rule says "..see auran forum for code to include in your clock object to work with this rule."

Found this code in DB station clock blue,<kuid:177792:1035>. Copy this to Notepad and save it as Clock.gs and add to the object that has the clock.

include "gs.gs"
include "world.gs"
class clocksbb isclass MapObject
{
int minut, hour, intime;
void update (Message msg)
{
intime = Str.ToInt(msg.minor);
if(intime > 719) {
intime = intime - 720;
}
minut = intime - ((intime/60) * 60);
hour = intime / 12;
SetMeshAnimationFrame("hourhand01", hour);
SetMeshAnimationFrame("minutehand01", minut);
}
public void Init () {
StopMeshAnimation("hourhand01");
StopMeshAnimation("minutehand01");
StartMeshAnimationLoop("secondhand01");
SetMeshAnimationSpeed("secondhand01", 0.033333);
AddHandler(me, "Clock-Update", null, "update");
}
};

Bob
 
Last edited:
But wait! Is true that the clock runs and displays the hour (and minutes). Now you save the session, and when you open it.. it always shows 12 mid day! (On DB clocks, seconds still turn) Am I the only one with this problem?
 
Change time

Hi guys,
In surveyor I can change the time using the world icon but it it won't change in driver. How do I make it change?:'(
 
Hi guys,
In surveyor I can change the time using the world icon but it it won't change in driver. How do I make it change?:'(

You need to select EDIT SESSION from the surveyer drop down menu, if you open that you can adjust the time of the DRIVING SESSION in there, and select weather etc. :)
 
Часы.gs

Описание в правиле часов гласит: «...см. форум Auran для кода, который нужно включить в объект часов для работы с этим правилом».

Нашёл этот код в базе данных часов станции DB, синий, <kuid:177792:1035>. Скопируйте его в Блокнот, сохраните как Clock.gs и добавьте к объекту с часами.

включить "gs.gs"
включить "world.gs"
класс clocksbb isclass MapObject
{
int минута, час, intime;
недействительное обновление (сообщение)
{
intime = Str.ToInt(msg.minor);
если (интайм > 719) {
интайм = интайм - 720;
}
минута = интайм - ((интайм/60) * 60);
час = интайм / 12;
SetMeshAnimationFrame("hourhand01", hour);
SetMeshAnimationFrame("минутная стрелка01", минута);
}
public void Init () {
StopMeshAnimation("hourhand01");
StopMeshAnimation("minutehand01");
StartMeshAnimationLoop(" Secondhand01");
SetMeshAnimationSpeed("secondhand01", 0.033333);
AddHandler(me, "Clock-Update", null, "update");
}
};

Боб
Спасибо
 
Back
Top