The online racing simulator
LFS Script System
(189 posts, started )
Quote from OldBloke :There isn't a timer in the scripting system and it has been requested by others.

A possible workaround - you can find macro recorders that assign keypress combinations to keys and often they allow the storing of pauses as well (the Logitech G15 kbd does this extremely well).

HTH

would it be possible via outsim?
Just confirming again, it's on my list to do pause or wait in scripts at some point though it's harder than most commands because scripts will then need to stay in memory. At the moment they are just run straight through so that is a change in the system. A useful and powerful change, that's why it's on my list of things to do.

At the moment, it can be done through InSim but of course you need an external InSim program running.
Not sure if this has been mentioned.

Be cool if you could program a script for host call out a safety car, and assign penalties to anyone improperly passing it who shouldn't. I'd like to map that to a key too. Same with penalties though you can do that already.

Not sure of some of the other things that could be done with it. Toggling lights to stay on would be nice, same with hand brake.

Alot is possible with LFS Lapper, but unfortunately I've not gotten that to work yet

V
Hi,
I've got a problem assigning ingnition (which is a reserved key) to a controler button.

my autoexec.lfs has these lines
/button 1 ctrl_f5
ctrlf 5 /press i

When I press button 1 nothing happeds and lfs does not report any invalid line in autexec on start up. When I assign numbers (9 - hazard lights on, 0 - hazards off) or invadllid key like "k" (ctrlf 5 /press k) everything works fine, hazards switches on, off and lfs reports pressing invalid key by a beep.
Where's the problem? The same is pitspeed limiter but there's no need assigning it because it has its own command.
Thanks for advice
Hi. It seems this is the one key that can't be assigned to a controller button. I'm not sure exactly why but the way I've coded it, it seems to be half way to being a proper assignable control, like the pit speed limiter. And it's not just a "one press" key like the signal / indicator keys so you can't use the /press command. Maybe I didn't finish the job because I've run out of space in the controls screen, maybe because it's a bit laborious adding them, due to the way some of the controls code is written - it needs a small rewrite to make it easier to add.

I have made a note to look at this, and probably update the controls screen a bit, maybe with a scroll bar for the buttons - I'm not sure yet.
Quote from Scawen :For now I just want to ask you if you can think of some "events" in the program that should call a script file. Just like the event of getting in a CAR calls the CAR.txt script.

Hi Scawen,

Thanks for asking! One event I would personally find very useful is "session starts". It would be fired when a race start and you're put on the grid, and when a quali or a practice start and you're put in the pit.

Here's why: I've made a script similar to this one that allows four different configuration for the buttons on my Logitech Momo wheel. I would use this event to switch automatically to the race configuration, which has buttons for pit limiter and look left/right that I use immediately when driving out of the garage, and clutch and handbrake that I use at the start. It sometimes happens when a race starts that another configuration has remained selected, and that always causes me to do a false start.
how about just adding to these files :

road.lfs
sequential.lfs
paddle.lfs

as one of those will be called when you are placed in your car (called from a CAR.lfs script).
Oh, I thought those scripts were triggered when you exit the CAR screen! Silly me!

Thanks a lot for the tip, Scawen!
Hi Scawen,

I've done what you suggested and that works perfectly in most cases. However there's one occasion when it doesn't work: when a session (like a race) is restarted. Then, since I'm already in the car, those scripts aren't triggered.

The session starts event I suggested would be fired, in this case. So I still think it would be useful. FWIW.

Flip
can you add a pause in milliseconds in a script?
Not atm, no.
Quote from danworth :can you add a pause in milliseconds in a script?

As Jakg has rightly said, not at the moment.

But it has been requested and is on 'the list' so no need to ask for it again.
-
(scipy) DELETED by scipy
Hi Scawen,
I've got a problem with clutch. I've got a h-shifter with 3 pedals which I use in ROAD cars and in the other I use sequential shifting with 2 pedals + button clutch on the wheel (only for starts).
The thing is that the button bindings and axis mapings for these two types of cars are made automaticly by "car scripts" (FXO.lfs, XRR.lfs etc.) but I am not able to figure out how to switch between axis clutch and button clutch by the script. Now I have assigned clutch on both - button and axis and I have to switch between them manualy in the options menu.
There is a command for shiter type - /shifter [auto/sequential/shifter]
So it would be heplful to have similar for clutch type. Something like /clutch [button/axis]
Thanks
Attached images
clutch_type.jpg
Quote from Scawen :Hello Programmers.

It's not possible to assign ctrl_f1 - ctrl_f12 to a keyboard key!
Impossible to use scripts with keys, only gamepad/wheel buttons work.

Please FIX.
/key D ctrl_f12


autoexec : line 6 - Unknown key function

Being able to remap keys to keys and key combinations, and mouse buttons to keys and key combinations would be awesome.
Coz mouse drivers can't adjust a thing in F11 and F12 menus without having the keyboard remaped.

LFS Script System
(189 posts, started )
FGED GREDG RDFGDR GSFDG