Results 1 to 4 of 4

Thread: addAction play sound for all ?

  1. #1
    hello
    i put a computer on editor and name it Pc1 and i addaction for it ***"MyAction"
    i do a script for this action :
    ----------------------------------
    _Pc1 = _this select 0

    Pc1 removeAction 0

    hint "Your Action Is Ok..."

    playsound "soundfx"
    *** *** *** *** *** ***
    exit
    ----------------------------------

    -now my problem is: only the player who activate this action ***can hear the sound and can see (hint) Your Action Is Ok...

    -the question what i can add or what i must modifie to make that soundfx playing and text showen for all players ,not only for who active that action ?

    thank you




  2. #2
    Private First Class
    Join Date
    Sep 5 2008
    Posts
    16
    Author of the Thread
    some 1 ?

  3. #3
    Scripts started by action are local, and so are the effects of hint and playsound. You need to make them global someway.

    You could use this little script publicCode.sqs

    Put that into mission dir. Then put the named game logics on the map as instructed. Then instead of hint and play sound do this for each effect you want to be global:

    [{hint {Your Action Is Ok...}}] exec "publicCode.sqs"
    [{playsound {soundfx}}] exec "publicCode.sqs"

    Or make scripts that you start globally, like:

    ; myscript.sqs
    hint "Your Action Is Ok..."
    playsound "soundfx"

    ; myaction.sqs
    [{0 exec {myscript.sqs}}] exec "publicCode.sqs"

  4. #4
    Private First Class
    Join Date
    Sep 5 2008
    Posts
    16
    Author of the Thread

    Question

    ahhh Im So happy *** ***Thx a Lotof Man

Posting Permissions

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