Ok, ok, I was just thinking aloud. Real F1 IS driven in that way, so it seemed logical to possibly have it in LFS only for BF1 some time in the future. It won't be in this patch, so, end of story (for now).
If you will had script when we will need absolutely
a /bind command
for assigning the execution of a script (anyone, from fox.lfs to sayhello.lfs or rollingstart.lfs) to the pressure of a key
And maybe u can convert the F1-8 messages in F1-8 scripts where u can bind messages or another script.
Something with a sintax like
/bind key /execute this
/bind F6 /write hello
or
/bind F6 /execute hello.lfs
and in the hello.lfs file
<lfsscript>
/scriptname hello
//this is my first script!!! Woohoo!! Scawen is a noob! lol xD
/write Hi all
/write Ciao a tutti
//was joking, don't bann me lol!!! xD
<lfsscriptend>
(i mean with /write something like writeln in pascal, the cursor automatically go to the next like)
Having a /say command may make it too easy for people to spam other racers. For example, someone could just copy and paste the line "/say Hello world!" 500 times in one script file.
Hm ok, but I remember I read somewhere that systems in F1 cars had the ability to know on which part of the track they were and have different engine mappings for different track sections. That doesn't seem to use telemetry, but of course I don't know exactly how that works, maybe it measures distance and combines that with timing information. Hmmm I guess the same thing in LFS could be acheved already with Insim and keyboard macros if someone had knowledge and patience to try that.
@Eldanor, sorry I quoted you, your reply was just the most concise to quote, but I was actually replying mostly to Scawen's request not to request complex things at this time. This is already off-topic.
Would it be possible with this "script" to bind F1 with command "/run greenflag.lfs" to let it run commando's in sequence from greenflag.lfs which should contains something like:
/rcm GREEN FLAG !
/rcm_all
/say GREEN FLAG !
Ifso \o/ if not, might be nice
Secondly, what i would really like is to make a script that would remap buttons on my wheel the minute im in the F12 screen. To reconfigure my directional-button on my wheel to simulate the arrow keys so i could control the pit-menu (f12) with my directional-button only. Would be nice if F9-F12 would be configurable to wheel-buttons anyway from within LFS so i wouldnt have to use profiler (but perhaps this is already configurable with the /btn command).
So basicly to add "events" like "pit-menu" altho it might not really be an event trigger.
Other events like "pit-in", "pit-out", "low-fuel" would be nice aswell.
on the topic of file extensions ... i think you should go with standard extensions like .cfg or .ini ... basically extensions people most likely will have associated to notepad
the only even ito trigger a script i can think of is pit stops (would require the ability to change the pit strategy from a script though)
the problem with this is what happens when you override the indicateleft command with a indicateright command ... the effect will be that you have 2 buttons currently assigned to noindicators
youd need ifs to make it really work
You can use /btn for this, but I dont know in how far it will work with more than 2 spacers in one line.
Maybe it's a good idea to use quotations for commands with spacers.
/bind key "/execute this"
I would like to see a command that loads a keyboard settings file when exiting pits, or when selcting the car in the carselect screen.
[EDIT]
as we have seen someone suggesting a "bind" command, its likely someone else could suggest an "alias" comment, which is often used to define a row or commands as one command (like a function).
/alias /do_something "/echo hello; echo world"
This isnt really needed because we have the /run command, so you could create a new file instead of an alias, resulting in Scawen having to do less work
Well I should have written "/btn" instead of "/bind"
My question was rather: Is it possible to use commands within a /btn assignment?
Yes, it could be used for the F keys, but you could also use it for other commands, Im specially thinking of admin commands. If you are admin, you could for example modify the event from "Shift+R" (vote restart) to the admin command "/restart".
[EDIT]
Im sorry my explanations are a bit strange, but if you knew how hot it is in my uni room here, you would understand
As I understand it the plan is to have about every function of lfs bindable via "/btn functionkeyword button". Also, if you want to issue a series of commands you can still use a btn-line like "/btn dosomething.lfs 5" and have dosomething.lfs contain the manual instructions to start what you want.
Even in a basic form the script system is very powerful.
While I'm thinking about it... Is it possible to issue ("virtual") buttonpresses from a script? Let's just imagin there is a functionkeyword missing for the suspension-view (shift+L). Then the user would want to make LFS believe that shift+L is pressed when he presses a button on his controler to toggle the suspension view.
....Just brainstorming...
It's not a command, it is just a way to refer to the action of shifting up. It is not used anywhere in LFS yet apart from in the /key and /btn commands, which bind a key or a controller button to an action.
ATM, we can do 3 things:
/btn
assign a keyword to a button, which will do certain things, like /btn shift_up 5, which will shift up when you press button 5 on your wheel. The "shift_up" and others are predefined keywords assigned to a function, which will do certain things in LFS, which are NOT typical LFS commands you can enter in the chat. This can't be done manually - Scawen has to implement this in the code (= you cant put your own events in there).
/key
the same just with keys on the keyboard (at least I guess so)
lalala.lfs
create a file, which can excecute many different commands.
events+files
When certain events are fired in LFS, Scawen can trigger a function that will execute a file, for example "start_race.lfs", which will be executed - guess what - when the race starts. Those must be hard coded either.
This was what I expected, and thus my suggestion is not senseless.
Imo it would be really nice and very powerful to assign one or more functions to one key, and not just the F-keys.
Anyway, it would be even nicer if it was possible to freely assign ALL keys on the keyboard, because with just 2 or 3 more default keys, it might become impossible for a keyboard driver to find a ergonomic way how to assign all the keys he needs.
The syntax works differently:
/btn functionkeyword button
That means:
/btn shift_up 5
will make LFS shift up when you press the 5th button on your controller (e.g. wheel).
In theory
/btn horn n
would make the horn start when you press the key n. But I'm not too sure about that because Scawen made only examples where he used controllerbuttons (1,2,3,4,5...)