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

[SKY-EO] Walk Sound


Suky
 Share

Recommended Posts

Hello guys, this guide is in based on LevelUP Sound. It is basic and will be easy to understand.

Video Preview (Including others sound effects like LevelUP, Death and Walk)
https://www.youtube.com/watch?v=YWpQ51AI80c

**Client Side**

After this
```
' spells

      Case SoundEntity.seSpell
          If entityNum > MAX_SPELLS Then Exit Sub
          soundName = Trim$(Spell(entityNum).Sound)
```

add this
```
' Walk

        Case SoundEntity.seWalk
            soundName = Trim$(WALK_SOUND)
```

add this on **ModConstants**
```
'WalkSound

Public Const WALK_SOUND As String = "SOUNDHERE.wav"
```

Now find this
```
' Sound entities

Public Enum SoundEntity
   seAnimation = 1
   seItem
   seNpc
   seResource
   seSpell
   ' Make sure SoundEntity_Count is below everything else
   SoundEntity_Count
End Enum
```

Below it add this
```
   seWalk
```

**Server Side**

Find this
```
' Sound entities

Public Enum SoundEntity
   seAnimation = 1
   seItem
   seNpc
   seResource
   seSpell
   ' Make sure SoundEntity_Count is below everything else
   SoundEntity_Count
End Enum
```

Below add this
```
  seWalk
```

Okey, now go to ModPlayer and find this
```
Sub PlayerMove(ByVal index As Long, ByVal Dir As Long, ByVal movement As Long, Optional ByVal sendToSelf As Boolean = False)
```

Below '**mapnum = GetPlayerMap(index)**' add this
```
   SendPlayerSound index, GetPlayerX(index), GetPlayerY(index), SoundEntity.seWalk, 1
```

It is very simple :D
Link to comment
Share on other sites

How can something so simple be so unnecessarily implemented…there's no need to send an additional packet (which do add up) alongside movement when you can just play the sound client side as movement is handled; you can just piggyback on that.

Backtrack everything you have here and head to **Sub HandlePlayerMove** in **modHandleData** on the client side. Just play the sound there.
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...