Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

RAIN FIX (very simple)


Ermenia
 Share

Recommended Posts

Hello

here is my tut

its very simple
(use ctrl+f to search the things you must replace)

ALL THINGS IN MODHANDLEDATA

If Val(parse(1)) = WEATHER_RAINING And GameWeather <> WEATHER_RAINING then

replace that /\ with this\/

If Val(parse(1)) = WEATHER_RAINING And GameWeather <> WEATHER_RAINING And Map(GetPlayerMap(MyIndex)).Indoors = 0 Then

WEATHER_THUNDER And GameWeather <> WEATHER_THUNDER then

Replace that /\
with this \/

WEATHER_THUNDER And GameWeather <> WEATHER_THUNDER And Map(GetPlayerMap(MyIndex)).Indoors = 0 Then

PUT AFTER THIS:

' Draw night (for normal players).
                If GameTime = TIME_NIGHT Then
                    If Map(GetPlayerMap(MyIndex)).Indoors = 0 Then
                        If Not InEditor Then
                            Call Night
                        End If
                    End If
                End If

THIS:

                ' stop regen bij indoors
                If Map(GetPlayerMap(MyIndex)).Indoors = 1 Then
                    Call frmMirage.BGSPlayer.StopMedia
                End If

NEW (thanks to: Balliztik1 for pointing me on that)

        If GameWeather = WEATHER_RAINING Then
            Call PlayBGS("rain.wav")
        End If

replace that with this:

        If GameWeather = WEATHER_RAINING And Map(GetPlayerMap(MyIndex)).Indoors = 0 Then
            Call PlayBGS("rain.mp3")
        End If

        If GameWeather = WEATHER_THUNDER Then
            Call PlayBGS("thunder.wav")
        End If

replace that with this:

        If GameWeather = WEATHER_THUNDER And Map(GetPlayerMap(MyIndex)).Indoors = 0 Then
            Call PlayBGS("thunder.mp3")
        End If

Good Luck

Greetings,

Ps. This is my first tut i hope its good enough for the first
Maby rate 1/10?
Link to comment
Share on other sites

This is, indeed a fix for the rain sound while indoors. However, when programming, it's generally best to go to the source of the problem, not to stop it once it happens. You are turning off the BGS once it plays. It'd make more sense to keep it from starting.

This controls when the file actually starts:

```
        If GameWeather = WEATHER_RAINING Then
            Call PlayBGS("rain.wav")
        End If
        If GameWeather = WEATHER_THUNDER Then
            Call PlayBGS("thunder.wav")
        End If
```
It'd be a simpler matter to detect the map type and not allow it to start.
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...