Jump to content

Switching radio channel & Removing clock


Guest felix.putze

Recommended Posts

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

Thank you for your help! :D

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
  • 4 months later...

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
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! :D

Link to comment

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...