Home   Help Search Login Register  

Author Topic: @ publicvariable on client is true  (Read 3333 times)

0 Members and 1 Guest are viewing this topic.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:@ publicvariable on client is true
« Reply #15 on: 22 Jan 2004, 21:41:53 »
Thanks Chris, I'll put it in the script and bug my friends again tomorrow.
The mission file is 3,8 megs and I've done about 20 tests on it now. Lucky me I have a good friend to test it with (you know who you are  ;)) For now it's bedtime again. I'll keep you posted.

/edit
Yes I will be doing a smaller version too, with the BIS songs  ;D
« Last Edit: 22 Jan 2004, 21:42:35 by Artak »
Not all is lost.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:@ publicvariable on client is true
« Reply #16 on: 23 Jan 2004, 10:07:02 »
I actually gave it a shot late in the evening yesterday. Turned out IT WORKS! So very cool  :D

Thank you very much for all who contributed to the cause and a special  :-* for Chris on taking time to explain it so well.

I'll post the final version here after I get home in a few hours.
Not all is lost.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:@ publicvariable on client is true
« Reply #17 on: 23 Jan 2004, 16:43:18 »
Code: [Select]
safesongclient = false
dangersongclient = false
_safesongs = ["soft","smooth","kinky","track3","track4","track7","track11","track15","wait"]
_dangersongs = ["hard","hard2","spirited","track5","track13","wait"]
_johtajat = [Davleman,Neveklovman,Kostman,Skaliceman,Pasekyman,Opatovman,Joudovman,
Dolinaman, Mokropsyman,Slapyman,Vidlakovman,Petroviceman,Mirovman,Modravaman,
Mokravrataman, tempman_0,tempman_1,tempman_2,tempman_3,tempman_4,tempman_5,
tempman_6,tempman_7,tempman_8,tempman_9,Stsedloman,Okrouhloman,Borman,Lipanyman,
Lanyman,Bitovman,Malavesman,Velkavesman,Blataman,Loukovman,Vartaman,Troskyman,Kvildaman,
wtempman_0,wtempman_1,wtempman_2,wtempman_3,wtempman_4,wtempman_5,wtempman_6,
wtempman_7,wtempman_8,wtempman_9]
~5
#loop

?({_x distance (leader maingroup) > 400} count _johtajat) == (count _johtajat): goto "safesongs"
?({_x distance (leader maingroup) < 350} count _johtajat) > 0: goto "dangersongs"

~3
goto "loop"

#safesongs
?!(local server): goto "safesongswaitforclient"
randomsafesongselect = random (count _safesongs)
randomsafesongselect = randomsafesongselect - (randomsafesongselect mod 1)
safesongclient = true
"PublicVariable {_x}" foreach [randomsafesongselect,safesongclient]
~2

#safesongswaitforclient
@safesongclient
randomsafesong = _safesongs select randomsafesongselect
?(local server): safesongclient = false; publicvariable "safesongclient"
?randomsafesong == "wait": goto "wait"
playmusic randomsafesong
goto "wait"


#dangersongs
?!(local server):goto "dangersongswaitforclient"
randomdangersongselect = random (count _dangersongs)
randomdangersongselect = randomdangersongselect - (randomdangersongselect mod 1)
dangersongclient = true
"PublicVariable {_x}" foreach [randomdangersongselect,dangersongclient]
~2

#dangersongswaitforclient
@dangersongclient
randomdangersong = _dangersongs select randomdangersongselect
?(local server): dangersongclient = false; publicvariable "dangersongclient"
?randomdangersong == "wait": goto "wait"
playmusic randomdangersong
goto "wait"


#wait
_luuseri = [_johtajat,(leader maingroup)] call closesttarget
?_luuseri distance (leader maingroup) < 200: _johtajat = _johtajat - [_luuseri]
_count = 0
#waitloop
_count = _count +1
?({_x distance (leader maingroup) < 150} count _johtajat) > 0: goto "loop"
?_count > 240: goto "loop"
~1
goto "waitloop"

There. Thanks again to all who helped.  :-*
« Last Edit: 23 Jan 2004, 21:15:10 by Artak »
Not all is lost.