Suky Posted November 5, 2015 Author Share Posted November 5, 2015 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**```'WalkSoundPublic Const WALK_SOUND As String = "SOUNDHERE.wav"```Now find this```' Sound entitiesPublic Enum SoundEntity seAnimation = 1 seItem seNpc seResource seSpell ' Make sure SoundEntity_Count is below everything else SoundEntity_CountEnd Enum```Below it add this``` seWalk```**Server Side**Find this```' Sound entitiesPublic Enum SoundEntity seAnimation = 1 seItem seNpc seResource seSpell ' Make sure SoundEntity_Count is below everything else SoundEntity_CountEnd 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 More sharing options...
Coyote Posted November 5, 2015 Share Posted November 5, 2015 Nicely done.Simple , short and it works.GJ! Link to comment Share on other sites More sharing options...
Colonello Posted November 6, 2015 Share Posted November 6, 2015 A nice simple tutorial that adds just a bit of extra needed immersion. Awesome! Link to comment Share on other sites More sharing options...
Aurelijus1 Posted November 6, 2015 Share Posted November 6, 2015 it's for npc walk sound too? Link to comment Share on other sites More sharing options...
Exception Posted November 6, 2015 Share Posted November 6, 2015 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 More sharing options...
sherwin Posted November 7, 2015 Share Posted November 7, 2015 Don't make the server handle this kind of system.. Just play the sound on client side after players took one step Link to comment Share on other sites More sharing options...
Suky Posted November 7, 2015 Author Share Posted November 7, 2015 They are right, but I did based on the sound while leveling, whoever wants to can use this method or simply make the sound on the client side. :p Link to comment Share on other sites More sharing options...
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