• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Get your art tools and paintbrushes ready and enter Hive's 34th Texturing Contest: Void! Click here to enter!

Audio player.

Status
Not open for further replies.
Level 8
Joined
Aug 26, 2016
Messages
142
I can’t figure out what the problem is with the timer, which should, in theory, be adjusted to the length of the track that is currently playing, but for some reason the game just starts to lag a lot.
 

Attachments

  • изображение_2023-01-29_184245644.png
    изображение_2023-01-29_184245644.png
    349.2 KB · Views: 11
  • изображение_2023-01-29_184257550.png
    изображение_2023-01-29_184257550.png
    250.8 KB · Views: 11
  • изображение_2023-01-29_184309491.png
    изображение_2023-01-29_184309491.png
    291.1 KB · Views: 13
Level 19
Joined
Jan 1, 2018
Messages
742
Maybe 'length of last played music' doesn't work and returns 0, then the timer would trigger 10000 times per second, which explains the lag.
Also you're only setting the timer duration in the initial trigger, so it will always have the duration of the first music played. You should start the timer again in the timer expires trigger to update its duration.
 
Level 23
Joined
Dec 4, 2007
Messages
1,563
Print out a debug message, displaying the length of the last music track.

Game - Display to (All players) the text: (String((Length of (Last played music))))

which is 0, so the timer fires in a permanent loop, freezing the game.
I fear the function doesn't recognize calls from the custom script.
I think you have to set a real variable manually, with the length of the current track and go from there.
 
Last edited:
Status
Not open for further replies.
Top