I'm back again , Am wondering now if I can assign a certain key in the .sbeam to function as a trigger for a sound. You'll receive credit in a mod if you can help me make it work! Thanks
The attached mod adds a horn to the pickup as an example. I've named everything so it should make sense as to which values are used where, and there is also an example of a toggle type action too. The thing should be rebindable if you remove the included inputmap, its defaulted to H.
Eh, it's lua. I don't do lua --- Post updated --- Unfortunately, this isn't doing what I'd like. Thanks for your time anyway!
Not when you have other stuff to work on. It's non-sense to dedicate time on X, if you know you will need to rework X in the near future. Better spend time on something else, until you can do X properly. I hope you see the point there.
ᕕ( ᐛ )ᕗ OT: I can see if I can do something that'd let you play a sound on key press, but I'm not at home ATM.
The lua files above work well however two problems/undesirable effects occur: The sound is constantly looping at a fixed rate in time no matter when I press the button. I would like it to start the sound at the beginning of the file when I press 'V' The sound is supposed to be a startup sound activated by pressing 'V'. I was able to make this work but it breaks the startup function in the game and only plays the sound.
You don't want to be making a new binding for something that's already in the game, its way better to just tap into the functionality already in the game. Doing it this way ensures that the sound plays whenever the starter is on e.g. when the automatic gearbox tries to restart. I've attached an example, but haven't had time to get it to loop from the start every time it fires, maybe I'll have a look tomorrow.