Turn on/off blinker

Forum rules
SCS as a company do not wish to have paid mods on this forum. While we understand that not all paid mods use the Intellectual Property of other companies/people, it is very hard to moderate what is and isn't acceptable when money is involved. There are also concerns that it could look unfavorable to potential work partners going forward if SCS allow mods that may potentially use unlicensed branding.
Posting in the Mods forum (ATS and ETS2) is restricted to sharing free-to-the-public mods and providing support for mods. For more details, please check the Forum Rules.
grankee
Posts: 1
Joined: 30 Jan 2017 16:36

Turn on/off blinker

#1 Post by grankee » 30 Jan 2017 17:47

Hi. I would like to make a true swich for indicators. I couldn't find solution for this.
I need to turn on indicator when specified button is pressed and turn off when is released.
I tried work on controls.sii but there is not much explains how cfg exactly works.
If anyone can help me or give a clue...
My ideas were:
1. Set joy.b6?0 and !joy.b6?0 for lblinker (in case if !joy.b6?0 will be detected as button release) but then blinker doesn't work at all. So is any way to bind an action for button release?
2. Use analog stick in my old gamepad. This need to do action when stick is between hmm 60% and 70% (turn on click) and then go to 100%, when i release stick then is going back from 100%, hit 70%-60% range again so do click again and turn off blinker. This idea sounds more probably for me but i have no idea how to use functions like normalize, gte, sel, clamp and other i skipped and what they do? I know some base of C++ and medium in PAWN but functions are unknown for me at this point.

I found https://trucksimulators.nl/forum/viewtopic.php?t=12023
looks to be some clue but not exactly. As I understand gear is basen on check every frame if button is pressed while indicator is based on click event. As you see transfer frame based to event based is pretty simple but vice versa isn't for me.
User avatar
Serge SB
Posts: 33
Joined: 09 Nov 2013 07:19
Location: Russia, Moscow

Re: Turn on/off blinker

#2 Post by Serge SB » 12 Mar 2017 11:13

This is not about functions, that you write in config_lines[nnn]: "mix ..." strings. What we need is the mix action. Now there is a 'lblinker' and 'rblinker' actions. They actually toggle blinkers on/off. To be able to turn on blinker while some button is continuously pressed SCS should create corresponding action. 'lblinkeron' and 'lblinkeroff' for example.

They did this for 'gearsel1tgl' action: there are 'gearsel1on' and 'gearsel1off' - these are used for SKRS (great thing, by the way). These actions were present long before in controls.sii, but were made available throw game settings only after SKRS appeared.

Me too interested in such actions, that control on and off states (instead toggling them). Right now I'm thinking about modding my G27 to add column switches from real car (maybe even real SCANIA column switch). So more on/off actions would be highly appreciated (light, wipers, etc.)
User avatar
Cadde
Posts: 6806
Joined: 24 Apr 2013 18:08
Location: Have no fear, i am from the internets!

Re: Turn on/off blinker

#3 Post by Cadde » 14 Mar 2017 23:49

Moved from ETS 2 -> Help requests to mods -> Help requests.
On extended hiatus.
User avatar
ThunderSky
Posts: 763
Joined: 20 Feb 2017 14:19

Re: Turn on/off blinker

#4 Post by ThunderSky » 30 Jan 2020 14:44

Does exist any plugin that can do this?
User avatar
Serge SB
Posts: 33
Joined: 09 Nov 2013 07:19
Location: Russia, Moscow

Re: Turn on/off blinker

#5 Post by Serge SB » 20 Jul 2020 15:55

I haven't tried this yet, but it seems, that such bindings now exist. lblinkerh and rblinkerh. They are not assignable from user interface, but do exist in сontrols.sii.
Last edited by Serge SB on 22 Jul 2020 09:49, edited 1 time in total.
User avatar
ThunderSky
Posts: 763
Joined: 20 Feb 2017 14:19

Re: Turn on/off blinker

#6 Post by ThunderSky » 21 Jul 2020 18:52

@Serge SB Yes, it works! Nice discovery :D
User avatar
Serge SB
Posts: 33
Joined: 09 Nov 2013 07:19
Location: Russia, Moscow

Re: Turn on/off blinker

#7 Post by Serge SB » 22 Jul 2020 09:59

@ThunderSky Great:) Recheck that config again then, they have added a lot of interesting controls there. Like wipersN, where N is a digit from 0 to 4. Oh, by the way, do you know what those '?0' at the end of all the input names stand for?
Bartq
Posts: 2
Joined: 24 Mar 2021 11:22

Re: Turn on/off blinker

#9 Post by Bartq » 01 Aug 2021 07:29

Hey,

Could you help me with assign necessary controls ?
I built into my steering whhel blinker switch from MAN and I dont know how to set correctly controls, just to work in toggle switch mode, like e.g. gear shifter.

Code: Select all

config_lines[318]: "mix lblinker `joy3.b9?0 | semantical.lblinker?0`"
config_lines[319]: "mix lblinkerh `semantical.lblinkerh?0`"
config_lines[320]: "mix rblinker `joy3.b4?0 | semantical.rblinker?0`"
config_lines[321]: "mix rblinkerh `semantical.rblinkerh?0`"
Best regards

[ external image ]

[ external image ]

[ external image ]
Last edited by Bartq on 01 Aug 2021 07:31, edited 1 time in total.
Bartq
Posts: 2
Joined: 24 Mar 2021 11:22

Re: Turn on/off blinker

#10 Post by Bartq » 01 Aug 2021 08:56

I found a solution. Maybe sometime it help anyone.
For a blinker is need to set action for turn on blinker when key is pressed and turn off when key pressed is in negation (logical negation "!")

joy3 - joystick 3
b9, b4 - button 9, 4

Code: Select all

 
 config_lines[318]: "mix lblinker `! (joy3.b9?0) | semantical.lblinker?0`"
 config_lines[319]: "mix lblinkerh `joy3.b9?0 | semantical.lblinkerh?0`"
 config_lines[320]: "mix rblinker `! (joy3.b4?0) | semantical.rblinker?0`"
 config_lines[321]: "mix rblinkerh `joy3.b4?0 | semantical.rblinkerh?0`"
 
Similiar situation is with wipers. I have only 2 buttons so i'am using only 2 modes.
wipers0 - wipers off - it turn this mode only when button1 AND (logical conjunction) button3 is OFF (logical negation)
wipers1 - intermittent speed - is set when button1 is pressed
wipers2 - continuous speed - is set when button3 is pressed

Code: Select all

 
 config_lines[304]: "mix wipers0 `(!(joy3.b1?0)) & (!(joy3.b3?0)) | semantical.wipers0?0`"
 config_lines[305]: "mix wipers1 `joy3.b1?0 | semantical.wipers1?0`"
 config_lines[306]: "mix wipers2 `joy3.b3?0 | semantical.wipers2?0`"
 config_lines[307]: "mix wipers3 `semantical.wipers3?0`"
 config_lines[308]: "mix wipers4 `semantical.wipers4?0`"
 
Last edited by Bartq on 01 Aug 2021 08:57, edited 1 time in total.
Post Reply

Return to “Help requests”

Who is online

Users browsing this forum: No registered users and 4 guests