lua scripting : How to move incab camera?

Posted:
Fri Jan 09, 2015 1:15 pm
by shahar
I'm creating scenarios and I want to move the InCab camera (like in the first Academy scenarios).
I have some expirience with programming and lua scripting for TS (all of my knowledge is what is in the lua
scripting manual in this site).
After digging inside the code of the Academy scenarios I think the function that moves the camera is "DeferredEvent".
Re: lua scripting : How to move incab camera?

Posted:
Sun Feb 01, 2015 8:50 am
by RudolfJan
You should use this:
- Code: Select all
SysCall("CameraManager:ActivateCamera","CamCamera",0)
If you replace 0 by another value, e.g. x, the camera will return to the previous cameraview after x seconds.
\
In the next version of the scripting guide you will find more info on the functions used for the DTG tutorials.
Re: lua scripting : How to move incab camera?

Posted:
Sun Feb 01, 2015 12:11 pm
by OldProf
Some time ago, Claudio Musa offered a Camera Cab Position utility that allowed cab (and car) camera positioning as well as the ability to add cameras. This had to be done to each engine or passenger car and could be restored (fairly) easily from a save file, but I'm not sure whether those positions could be saved "permanently" as properties of a piece of rolling stock. In any case, his utility might provide some ideas.