Guest Posted October 25, 2008 Share Posted October 25, 2008 Hello, I have two short questions which occured during the scripting of my "driving simulator" scenario. Maybe you can tell me if I missed a solution. Thanks you very much! 1) I tried to remove the in-game clock using showPlayerHudComponent("clock", false). This works for all other HUD components but not here. Is this a bug? (Bonus question: Is it possible to remove the "watermark" in the bottom right?) 2) Is it possible to switch the radio channel? I tried to call "next_radio" via executeCommandHandler but this does not seem to work with build-in handlers. I also tried to use the "next_radio" control state but had no luck either. Am I perhaps using it the wrong way? Thanks again! Felix Link to comment
Winky Posted October 25, 2008 Share Posted October 25, 2008 1. That removing clock thing is a bug in DP2.x. 2. Tried already: http://development.mtasa.com/index.php? ... ntrolState ? Link to comment
Guest Posted October 25, 2008 Share Posted October 25, 2008 Thank you for your help! Tried already: http://development.mtasa.com/index.php? ... ntrolState ? Yes, but without success. I am under the impression, that most control states are real "states" (i.e. they are active for a period of time), while radio_next is actually a trigger. I tried setting radio_next to true, I tried to set it true and then false again to emulate pressing and releasing of a button. Any other suggestions how to use setControlState for radio_next? Link to comment
funkazz Posted March 23, 2009 Share Posted March 23, 2009 I can confirm the 2nd problem. Neighter executeCommandHandler(), nor setControlState() seem to work for "radio_next". Does anybody have a solution for changing the radio station via scripting? Link to comment
darkdreamingdan Posted March 23, 2009 Share Posted March 23, 2009 I think they're actually disabled to prevent a strange crash (I remember reading in the source code). When you change radio, its actually all handled by MTA - it detects your key press, and forcefully sets your radio to the next one. With setControlState its not actually detecting your key press. On the positive side, the fact that radio is entirely handled by MTA means in future we can have setPlayerRadioOverride ( [int radioStation = noOverride] ) or something to that effect. This could even work on foot. Link to comment
Gamesnert Posted March 24, 2009 Share Posted March 24, 2009 On the positive side, the fact that radio is entirely handled by MTA means in future we can have setPlayerRadioOverride ( [int radioStation = noOverride] ) or something to that effect. This could even work on foot. I'd really love to see that! Link to comment
robhol Posted March 25, 2009 Share Posted March 25, 2009 On a side note, I noticed a DP2 bug where the radio is AAAAAAAAAAAAAALWAYS set to Playback FM when you enter a car... can't remember for sure whether or not it happens in the nightlies, but if it does, looking into it might be smart, especially if we're planning scripted radio control... Link to comment
Gamesnert Posted March 25, 2009 Share Posted March 25, 2009 It still does yes, very annoying IMO... I mean, it's somewhat the WORST channel to have your radio on... (except for User Track Player, while you haven't added custom sound files... Constant commercials FTL) I mean, I don't give a dang about the radio anymore. Windows Media Player on the background FTW. Link to comment
robhol Posted March 25, 2009 Share Posted March 25, 2009 Agreed: it doesn't help that 99% of the music on PBFM sucks monkey balls. If the radio should default to anything (which, IMO would be even better than GTA's default "random" stations) it should be off. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now