Home   Help Search Login Register  

Author Topic: How do you let the music Repeat?  (Read 642 times)

0 Members and 1 Guest are viewing this topic.

DarkCell

  • Guest
How do you let the music Repeat?
« on: 03 Aug 2003, 15:31:18 »
Can someone Tell me How I can let music Repeat for ever in the game?
or just 2 times or 4 or whatever you know what I mean  ;)
Becease I Made my own music in the Game but I dont know how I can let the music repeat a few times help me plz!!  :(

Skanderborgvej

  • Guest
Re:How do you let the music Repeat?
« Reply #1 on: 03 Aug 2003, 17:47:20 »
Well first you must know how long the music plays, after that you can fill it in a script and place a loop

example:

#loop
playmusic "mytrack"

~360 (how long the track is)

goto "loop"

GRTZ  ;) Vlaamse Leeuw

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:How do you let the music Repeat?
« Reply #2 on: 03 Aug 2003, 18:29:29 »
Vlaamse is correct  :) But to go a little deeper..

You should make an .sqs file first in your mission folder, for example with notepad. Name the file as music.sqs (can be something else too).

Then type in the script what Vlaamse just wrote there but with a little more


      _max = _this select 0
      _counter = 0
   #loop
?_counter == _max: exit
playmusic "mytrack"

   ~360 (how long the track is)
_counter = _counter +1

goto "loop"


After saving the .sqs file execute it in game (with what ever you're using to play the music; trigger, waypoint,..) like this

[number of times to repeat the song] exec "music.sqs"
for example
[4] exec "music.sqs"
Not all is lost.

BronzeEagle

  • Guest
Re:How do you let the music Repeat?
« Reply #3 on: 04 Aug 2003, 01:03:01 »
how would i end the script.  like what if i wanted it to loop up until .....then what?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:How do you let the music Repeat?
« Reply #4 on: 04 Aug 2003, 02:28:19 »
To leave a loop you need something like one of the following within the loop:-

? _counter > 25:exit

? _counter > 25: goto "nextPart"

? not (alive loon1): exit

? _time > 360: var1=false
Plenty of reviewed ArmA missions for you to play