• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Game freezes when changing music

Status
Not open for further replies.
Level 6
Joined
Mar 1, 2013
Messages
52
Hello,
I have a problem with music trigger. Every time a unit enters specific region, then a different music (custom implemented) will play in the background, however everytime this happens, the game will lag for a 1 second, but if the unit leaves the region and music changes back to default original music, then there's no lag. Is there any way or script to fix this kind of micro lag?
Map is edited in Jassnewgenpack

thanks.
 
Level 6
Joined
Mar 1, 2013
Messages
52
  • Northriver Music
    • Events
      • Unit - A unit enters Northriver town music <gen>
    • Conditions
      • (Entering unit) Equal to HeroUnit
    • Actions
      • Sound - Play Town_Music <gen>
      • Sound - Set music volume to 100.00%
      • Sound - Set music to 100.00%
Its a simple trigger in RPG map, where only one unit can activate it at a time in a large region.

  • Northriver Music leave
    • Events
      • Unit - A unit leaves Northriver town music <gen>
    • Conditions
      • (Leaving unit) Equal to HeroUnit
    • Actions
      • Sound - Stop music Weakening in the end
      • Wait 1.00 seconds
      • Sound - Play Music
Everytime the unit enter this region, game will freeze for 1 second, but when u leave region, it won't.
 
Status
Not open for further replies.
Top