You could do it but any slight error could end up with ending on barricade... to do AI for ur car u need to have at least the position to trigger left/right.
But such thing is possible: insim (position, heading, speed etc) + key stroke emulator = autopilot
Could be quite helpfull on cruise servers
- select if *lock keys state should be on or off to trigger loop
- tag UseHorn using "modifier keys" - Shift, Ctrl, Alt (1 option to choose). Scan interval for this keys is 50/500 - once triggered, thread waits 500ms and starts scanning those keys in 50ms interval (quick enough for instant response and on the same way it won't double-switch when key is longer pressed)
- every checkbox and radiobutton is saved now in strobe file. There shouldn't be any compatibility issues loading files from both versions on 1.0 and 1.2
- loading files from command line - just drop strobe file over .exe icon and it will load at start, as for command line just give path to strobe file in first argument
I didn't test it long, but there shouldn't be any major bugs
happy using
Q1: I didn't implement this feature because, like I said before, I wanted to write it as fast as possible = the easiest way. Its no prob to add such feature
Q2: I have added horn after some time, and since some ppl did make their own strobe files, there would be some compatibility issue to save horn switch there.
Edit: I found a simple solution. I will add both things tonight
I will have to leave the "state keys" as trigger to set the program running - mostly because its easier I dont have to scan for any key pressed - just read its state when i want to, keyboard hardware does the rest (and its instant).
Some time ago there was "emergency service" program for lfs that had 500ms key scan, so u had to press shift + smth for half a second to be sure that the trigger was set. With state keys (*lock) you have the comfort that it will always start up.
@JO53PHS that is definitively numlock & laptop keyboard problem - should go away when switching to scroll-lock etc.
I made LFSstrobe in few hours just to be able to type while having sirens on during cops and robbers game.
I will add an option to choose which "state key" triggers strobes as soon as I get home.
btw. Why NumLock is annoying? I didn't have any problems using it nor any noises (sound-speaker squeak?)... Could someone describe what is happening?
- There is no need to "install" it, just run it from any location you like.
Its just a key pressing emulator keys will be pressed in given order for given time (in ms), additionally every pressed key is followed by "backspace" so you can write messages.
Numlock state defines whether program is running or not.
as far as Lfs is sending horn/lights/hazards state every 500ms (about) its almost useless while playing online.
I will try to help if there are some unsolved problems left
it doesnt work good enough on internet though quick key strokes are not beeing send to other players quick enough so they rarely see the "strobe" effect.
The only way to prevent it, is to set at least 500ms key interval - then other players will see the blinkers change correctly... but it kills the effect.
Yesterday i saw such strobes working on some d1 uk vid... I thought it would be cool idea to implement such thing. After few hours I was able to write tiny app in c# that emulated pressing 7,8,0,G in given order (G==lights).
u will probably need .net runtime libraries to run it.
What does this program do?
-It emulates pressing certain keys on keyboard and waits ms of time before pressing another.
-After each pressed key a backspace key is also beeing send - thanks to this, there is no problem with chating because all send keys are instantly erased.
-Start/stop with NumLock.
Ps. load the given strobe.txt into it to see how the config should look. all letters should be in capitals.