Announcement

Collapse
No announcement yet.

Sound loop script - problem

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sound loop script - problem

    Hi,
    I got ambience/kind of music sound for my Fallout style mission. I want the sound to play and play over again with about 30 sec breaks.

    Lenght of the sound is 4 min 38 sec. Now, Inq and Snake tried to help me out with this script:

    Code:
    //explore.sqf
    
    while {true} do {
        playsound "explore";
        sleep 300;
        };
    I run it in init.sqf as
    Code:
    [] exec "explore.sqf"

    I got sound in the mission, but it doesn't loop to play again. Why?

    Help would be appreciated so I can finally finish with my mission :).
    Last edited by Mikee; 12-23-2009, 12:17 PM. Reason: problem solved

  • #2
    Re: Sound loop script - problem

    Problem solved, did it as *.sqs file.

    Code:
    #loop
    playsound "explore"
    ~350
    goto "loop"
    Init.sqs ->
    Code:
     [] exec "explore.sqs"

    Comment


    • #3
      Re: Sound loop script - problem

      Sqf has to be run with execVM, that's your problem with the original. Exec is only for sqs.

      Comment


      • #4
        Re: Sound loop script - problem

        Fallout style mission!!?? Sign me up mikee!
        Good job :D

        If you hadnt figured it out i had a lame way of doing it using my minute amount of knowledge about the editor (im learning as fast as my lazyness will allow me!)
        Nihility

        Comment


        • #5
          Re: Sound loop script - problem

          Originally posted by Soupy_Norman View Post
          Fallout style mission!!?? Sign me up mikee!
          Good job :D

          If you hadnt figured it out i had a lame way of doing it using my minute amount of knowledge about the editor (im learning as fast as my lazyness will allow me!)
          Check desert pics is this link (3rd post from the bottom): http://www.tacticalgamer.com/armed-a...ssion-wip.html - pictures in first post are not actual anymore :).

          Comment

          Connect

          Collapse

          TeamSpeak 3 Server

          Collapse

          Advertisement

          Collapse

          Twitter Feed

          Collapse

          Working...
          X