Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: How does "sleep" work?

  1. #1
    I thought it would be a matter of code; sleep(); code. But this doesn't work.

  2. #2
    See sleep command in the Biki
    you need to specify the sleep period in seconds
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">blablabla...

    sleep 10
    /*sleeps for 10 seconds*/

    blablabla[/QUOTE]



    Whisper / Kalbuth / MrK
    ex-OFrP member.
    OFCRA lurker : OFCRA www
    Planetside 2 / Tribes Ascend, member of Formido Clan

  3. #3
    whats it do tho? is it not the same as ~6

    MattXR ( MxR )

    Check out my Twitter BIS Fans and Sub!
    -- MRKCCO Twitter --


  4. #4
    It&#39;s ~ for functions.
    --Ben

  5. #5
    Private First Class
    Join Date
    Jan 10 2006
    Posts
    11
    Author of the Thread
    I&#39;m making an intro for a mission, but I don&#39;t know how to delay the next camcommit.

  6. #6
    To delay the camcommit use
    ~10

    or ~ and the time to wait.
    Editing/Modding/Scripting question? Head on over to OFPEC

  7. #7
    Private First Class
    Join Date
    Jan 10 2006
    Posts
    11
    Author of the Thread
    I thought they changed the ~ in arma

  8. #8
    They only changed it for functions. In the case of functions you use the sleep command. In a general script you can continue to use ~.

    Hoz

  9. #9
    Private First Class
    Join Date
    Jan 10 2006
    Posts
    11
    Author of the Thread
    Whenever I use it I get "error invalid number in expression".

    Am I not supposed to use it like this: blablabla; ~10; blablabla

  10. #10
    You should not use old style SQS scripts, executed with exec command, in ArmA. Instead you should use the new SQF scripts executed with execVM/spawn, where the sleep command must be used. The sleep command does not work in functions since it would freeze the whole game.

    Look here for an example of how the script syntax has changed.




Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •