The online racing simulator
Help with setting type of view via scripts
Hello guys,

I am facing a small resistance regarding a workaround to a request I made :
my goal is to set according to the type of car selected the view to be either "driver" (formulas, mrt) or "custom" (hood for the remaining cars).

I am entering the following complex scripts Looking in the *.lfs files :
***
// This script is run when you select the FZ5

run road
ff 18
view custom

***
// This script is run when you select the FO8

run paddle
view driver
ff 21

***
I have tried also with /view but it is not working.
FFB strength is well taken into account ...

extract from the Commands.txt :
/view [fol/heli/cam/driver/custom] - select view

Any ideas why it is not working ?


edit : issue corrected with 0.6U2
Not tried to use any scripts, but the commands.txt file does have

/view save - save any changes made to a custom view

Or maybe the views are saved in the data/views folder. All the car types are listed in there (eg BF1.cvw), although they can't be viewed in notepad.
Maybe I'm missing something but why not just set Default driver view to Custom and make a custom view for each car? You can make custom view to look same as the In car view by clicking the "Eye position" button (just need to redo Mirror adjustment). No need for script or anything.
if I remember correct the custom view for formulas was not showing the LEDs and data on the wheel ... only driver's one is doing it
It's showing all that even in custom. Just need to set Clocks mode to "real" or "all".
I will get a look tonight, thanks !
Anyway, am I doing something wrong in the script ? are you having it not working aswell ?
There are some commands (view, press,...) that won't work with <car>.lfs scripts because those scripts are being executed too soon after the car is spawned (or at the same time). I wanted to write a bug report about this years ago but completely forgot. Now you reminded me Big grin

There would have to be some sleep function in the script system, which would be really amazing (hi Scawen) or the execution of those car scripts would have to be delayed a little.

So I'm afraid you can't get this to work now. You could however execute those scripts manually by typing "//fz5" (or you could just copy paste the fz5.lfs file and name it for example custom_view, then F08.lfs to default_view and then just execute it by //default_view and //custom_view). You can bind that to a key or a key combo (Ctrl+F1, etc).

EDIT: Well, never mind, you can just bind the /view command. I was thinking too much Big grin

FGED GREDG RDFGDR GSFDG