Due to increasing spam attacks, forum registrations are currently paused to keep our community safe and spam-free. Come hang out and stay connected with us on the SimHub Discord: https://discord.com/invite/nBBMuX7!

Catch you on Discord — and thanks for understanding!
Auto mute/unmute sh...
 
Notifications
Clear all

[Solved] Auto mute/unmute shaker profile

2 Posts
1 Users
0 Reactions
1,765 Views
(@mb55)
Active Member
Joined: 4 years ago
Posts: 11
Topic starter  

I have a trigger button on my dashboard that I use to mute/unmute my shaker profile during caution laps and green laps. How can I handle this in code so that it automatically mutes/unmutes whenever these flag events occur?

This topic was modified 4 years ago by TBS_66

   
Quote
(@mb55)
Active Member
Joined: 4 years ago
Posts: 11
Topic starter  

No need for a button. This can be handled with custom events in an existing or new .ini file in the c:\Program Files (x86)\SimHub\NCalcScripts folder.  Mappings to triggers can then be created for these events in "Controls and events".

Custom events:

[ExportEvent]
name='ShakerOn'
trigger=[DataCorePlugin.GameRunning] and ! [DataCorePlugin.GameData.Flag_Yellow] and [ShakeITBSV3Plugin.GlobalGain] != '85' 

[ExportEvent]
name='ShakerOff'
trigger=[DataCorePlugin.GameRunning] and [DataCorePlugin.GameData.Flag_Yellow] and [ShakeITBSV3Plugin.GlobalGain] = '85'

Event Mappings:

ExternalScriptShakerOn -> ShakeITBSV3Plugin.ToggleMuteFeedback
ExternalScriptShakerOn -> ShakeITBSV3Plugin.MainFeedbackLevelIncrement (changes the Global Gain to 85 from 84 to signify unmuted)

ExternalScriptShakerOff -> ShakeITBSV3Plugin.MainFeedbackLevelDecrement (changes the Global Gain to 84 from 85 to signify muted)
ExternalScriptShakerOff -> ShakeITBSV3Plugin.ToggleMuteFeedback

Note

Due to the absence of a Global Gain Muted property (as far as I know), the ShakeITBSV3Plugin.GlobalGain value is used to determine if the Global Gain is muted or not. '85' is just a placeholder for whatever your default global gain is set to. If you ever adjust this value from whatever the value is in your custom events, then the events will not fire.

 

 

 

This post was modified 4 years ago 4 times by TBS_66

   
ReplyQuote
Share: