Home   Help Search Login Register  

Author Topic: MP Arty almost working...  (Read 1301 times)

0 Members and 1 Guest are viewing this topic.

Soapyfrog

  • Guest
MP Arty almost working...
« on: 22 Jan 2003, 01:40:14 »
Using TakeOffTim's Fast Artillery script and trying to get to work in MP.

Problem is that although the explosions affect all clients, the smoke and particle animations as well as the sorch marks and sound do not register on any client except the one who called the strike.  The explosions aren't invisible, you can see the firey blast, but none of the other associated special effects are there.

Any suggestions?  Here are the relevant scripts:

init.sqs
***************
Code: [Select]
publicVariable "ARTfire"
publicVariable "ARTammo"
publicVariable "ARTadjustment"
onMapSingleClick {[_ctrl,_alt,_pos] exec "Artillery.sqs"}
ARTfire = false
ARTammo = 100
ARTadjustment = [0,0]
exit

Artillery.sqs
***************
Code: [Select]
publicVariable "ARTfire"
publicVariable "ARTammo"
publicVariable "ARTadjustment"

? ! (_this select 0) : exit
? ! (_this select 1) : exit
? (ARTammo <= 0) : exit
? ARTfire : exit

_pos = _this select 2
_fired = 0

_ok = createDialog "Artillery"
? (! _ok) : hint "fault"; exit

_min = lbAdd [101,"minimum"]
_thirty = lbAdd [101,"30m"]
_sixty = lbAdd [101,"60m"]
_ninety = lbAdd [101,"90m"]

_one = lbAdd [103,"1"]
_three = lbAdd [103,"3"]
_six = lbAdd [103,"6"]
_twenty = lbAdd [103,"5 x 4"]


ctrlSetText [104,format ["%1 shots left",ARTammo]]

lbSetCurSel [101,(ARTadjustment select 0)]
lbSetCurSel [103,(ARTadjustment select 1)]

@ARTfire

? ! (ctrlVisible 100) : ARTfire = false; exit

ARTadjustment = [(lbCurSel 101),(lbCurSel 103)]

? (lbCurSel 101) == _min : _scat = 10
? (lbCurSel 101) == _thirty : _scat = 30
? (lbCurSel 101) == _sixty : _scat = 60
? (lbCurSel 101) == _ninety : _scat = 90

? (lbCurSel 103) == _one : _shots = 1
? (lbCurSel 103) == _three : _shots = 3
? (lbCurSel 103) == _six : _shots = 6
? (lbCurSel 103) == _twenty : _shots = 20

closeDialog 0

? (_shots == 20) : goto "five_salvos"

Art1 say "ARTFire"
~1

? (ARTammo > 1) && (_shots > 1) : Art2 say "ARTFire"
~1

? (ARTammo > 2) && (_shots > 1) : Art3 say "ARTFire"
"SHELL125" camCreate [(_pos select 0) +Random(2*_scat) -_scat,(_pos select 1) +Random(2*_scat) -_scat,0]
~1

? (ARTammo > 3) && (_shots > 3) : Art4 say "ARTFire"
? (ARTammo > 1) && (_shots > 1) : "SHELL125" camCreate [(_pos select 0) +Random(2*_scat) -_scat,(_pos select 1) +Random(2*_scat) -_scat,0]
~1

? (ARTammo > 4) && (_shots > 3) : Art1 say "ARTFire"
? (ARTammo > 2) && (_shots > 1) : "SHELL125" camCreate [(_pos select 0) +Random(2*_scat) -_scat,(_pos select 1) +Random(2*_scat) -_scat,0]
~1

? (ARTammo > 5) && (_shots > 3) : Art2 say "ARTFire"
? (ARTammo > 3) && (_shots > 3) : "SHELL125" camCreate [(_pos select 0) +Random(2*_scat) -_scat,(_pos select 1) +Random(2*_scat) -_scat,0]
~1

? (ARTammo > 4) && (_shots > 3) : "SHELL125" camCreate [(_pos select 0) +Random(2*_scat) -_scat,(_pos select 1) +Random(2*_scat) -_scat,0]
~1

? (ARTammo > 5) && (_shots > 3) : "SHELL125" camCreate [(_pos select 0) +Random(2*_scat) -_scat,(_pos select 1) +Random(2*_scat) -_scat,0]


ARTammo = ARTammo - _shots
? (ARTammo < 0): ARTammo = 0

ARTfire = false

exit

#five_salvos
? (ARTammo > 0) : Art1 say "ARTFire"; _fired = _fired + 1
~1

? (ARTammo > 1) : Art2 say "ARTFire"; _fired = _fired + 1
~1

? (ARTammo > 2) : Art3 say "ARTFire"; _fired = _fired + 1
? (ARTammo > 0) : "SHELL125" camCreate [(_pos select 0) +Random(2*_scat) -_scat,(_pos select 1) +Random(2*_scat) -_scat,0]
~1

? (ARTammo > 3) : Art4 say "ARTFire"; _fired = _fired + 1
? (ARTammo > 1) : "SHELL125" camCreate [(_pos select 0) +Random(2*_scat) -_scat,(_pos select 1) +Random(2*_scat) -_scat,0]
~1

? (ARTammo > 2) : "SHELL125" camCreate [(_pos select 0) +Random(2*_scat) -_scat,(_pos select 1) +Random(2*_scat) -_scat,0]
~1

? (ARTammo > 3) : "SHELL125" camCreate [(_pos select 0) +Random(2*_scat) -_scat,(_pos select 1) +Random(2*_scat) -_scat,0]

ARTammo = ARTammo - 4
? (ARTammo < 0): ARTammo = 0
? (ARTammo == 0) || (_fired == 20) : ARTfire = false; exit
~5
goto "five_salvos"

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:MP Arty almost working...
« Reply #1 on: 22 Jan 2003, 04:21:59 »
ugh.  Don't make me look at that ;)

With 1.90+ Createvehicle supports shell simulation types.
So replace all your camcreate commands with createvehicle and see what happens.
Dinger/Cfit

Soapyfrog

  • Guest
Re:MP Arty almost working...
« Reply #2 on: 22 Jan 2003, 04:28:33 »
I'll give it a try!  Thanks for the tip...

Soapyfrog

  • Guest
Re:MP Arty almost working...
« Reply #3 on: 22 Jan 2003, 06:20:27 »
Createvehicle works like a charm, thanks!!