Home   Help Search Login Register  

Author Topic: loop  (Read 975 times)

0 Members and 2 Guests are viewing this topic.

Headhunter

  • Guest
loop
« on: 01 Mar 2004, 10:05:38 »
how do you make a sound or music loop???

xenofanes

  • Guest
Re:loop
« Reply #1 on: 01 Mar 2004, 12:29:54 »
In a script:
#loop
playmusic "mymusic"
~30
goto "loop"

In this example your soundfile is 30 seconds long. Did that help?

Headhunter

  • Guest
Re:loop
« Reply #2 on: 01 Mar 2004, 15:06:45 »
im not so good at making my own script (i dont have a clue to how you do it) so if i could download it somewere it would help a lot but it sounds like what i am looking for

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:loop
« Reply #3 on: 01 Mar 2004, 15:19:14 »
Making scripts is very easy.   Read snYpir's Friendly Intro to Code Snippets and Johan Gustafsson's Scripting Guide.
Plenty of reviewed ArmA missions for you to play

Captain Wacky

  • Guest
Re:loop
« Reply #4 on: 01 Mar 2004, 17:34:48 »
Here's how to do it, step by step:

Firstly create a script (.sqs) file within the mission folder.

To do this, create a new txt. file and change the extension to .sqs

next, open the .sqs file, (N.B. Make sure you uncheck the box which reads 'always use this program to open this file' if it's ticked.

In the script file write the following:

#Loop

playMusic "track1"

~10

GoTo "Loop"

(Explanations (The following isn't part of the script))

#Loop (where the loop begins)

playMusic "track1" (where you choose the track, "track2", "track5", etc.)

~10 (amount of seconds that the track runs for)

GoTo "Loop" (code that tells the script to back to #Loop)

I hope this helps. Go to the editors depot and read some tutorials.

Headhunter

  • Guest
Re:loop
« Reply #5 on: 01 Mar 2004, 19:24:30 »
i have one last question: how do i activate it ???

Captain Wacky

  • Guest
Re:loop
« Reply #6 on: 02 Mar 2004, 18:26:15 »
If you want the music to begin right at the start of the mission, then write this in the 'Init' field of the player unit.

this exec "scriptname.sqs"

When you start the mission, the script will activate automatically.