Hello! Can I ask for help?
We are working on one project for LOTUS and we finally got to import models from the modeling program into LOTUS.
First we decided to import and put into operation models, which we will then use very often. Specifically, it is a digital clock showing the time (Orange numbers) and the time when the last train left the station (Green numbers). The next item is a monitor that displays images of cameras from the station in real time:
I started working on displaying the current time in the game (Orange numbers). Model is OK. What I have a problem with is the script itself. I don't have such experience with programming. Together with my colleague we tried to compile the code, which I then tried to put into operation using various videos and articles from Lexicon. Unfortunately, unsuccessfully.
My first code:
I deleted this and with Tutorial for Text-Texture on YouTube I tried to put a static text in place, and I succeeded:
Unfortunately, I don't know how to proceed. Here on the forum I found some code that I tried to use, but again - unsuccessfully.
- {PUBLIC_VARS
- $Strassenname : string;
- TimeOfDay : single;
- texID_draw : integer;
- Time : string;
- Hour : integer;
- HourStr : string;
- Minute : integer;
- MinuteStr : string;
- Second : integer;
- SecondStr : string;
- }
- procedure write;
- var
- temptime: single;
- begin
- temptime := TimeOfDay * 24; // temptime = Zeit seit Mitternacht in Stunden (mit Bruchteilen)
- Hour := trunc(temptime); // ganze Stunden
- temptime := (temptime - Hour) * 60; //temptime = Zeit seit der letzten vollen Stunde in Minuten (mit Bruchteilen)
- Minute := trunc(temptime); // ganze Minuten
- temptime := (temptime - Minute) * 60; //temptime = Zeit seit der letzten vollen Minute in Sekunden (mit Bruchteilen)
- Second := trunc(temptime); // ganze Sekunden
- HourStr := IntToStr(Hour);
- MinuteStr := IntToStr(Minute);
- SecondStr := IntToStr(Second);
- Time := (HourStr+':'+MinuteStr+':'+SecondStr)
- $Strassenname :=
- Time;
- end;
- end.
Next, may I ask how I should then continue to show when the previous train left the station? I assume that the script will contain a command in the style "If the train passes over the trigger, start the countdown from 00:00", right? Alternatively, what should a script look like?
And my last question, can I ask how do I make monitors displaying images from cameras? It occurred to me that I could assign "Realtime Reflection" to each of the "plates" on which the image is projected. Unfortunately, I don't know how to do it...
Thank you very much for your help!
Have a nice day!
FidloBUS, Czechia
(Translated with Google)