Jump to content
Sign in to follow this  
10-78 Duke

Spectating script

Recommended Posts

Does anyone have a modified version of the Spectating script v1.2 by Kegetys which allows dead players to spectate only those players on thier side?

This is a great script but in order to use it in our clan's internal ladder competitions we need a modification as described above.

Any help would be much appreciated! biggrin_o.gifnotworthy.gif

Share this post


Link to post
Share on other sites

Thanks, Filer biggrin_o.gif .....but this version doesn't allow for spectating your side only in a team vs team match either.

Does anyone know if a modification of the original script is possible to achieve this?

Share this post


Link to post
Share on other sites

it's a simple modification of this script:

Remove the current line that sets the DeathCamArray and replace it with these two lines (assuming you have East Vs West). Fill out each of the arrays with players you want that side to spectate.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

?(Side Player == West): DeathCamArray=[W1,W2,W3,W4]

?(Side PLayer == East): DeathCamArray=[E1,E2,E3,E4]

Share this post


Link to post
Share on other sites

Thank you for the reply Strango.

Now, how can we also include disabling the seagull view in the script?

Share this post


Link to post
Share on other sites

disabling seagullmode is not possible ..well only by chossing another respawnmode ..

u can only force the player back in the dialog when he closes it by hitting the ESC-Key

that might be done by replacing the line

? !dialog : goto "seagull"

with

? !dialog : goto "start"

but i am at work and cant test this right now ..

deF

edit: better download that again .. i fixed something that didnt need fixing .. messed with GUER and resistace again ..

Edit: tested .. seems to work as expected .. drawback u can not get out of spectator .. not even to disconnect from the server .. u have to Alt+F4 then or wait for the next round ..

Share this post


Link to post
Share on other sites
it's a simple modification of this script:

Remove the current line that sets the DeathCamArray and replace it with these two lines (assuming you have East Vs West). Fill out each of the arrays with players you want that side to spectate.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

?(Side Player == West): DeathCamArray=[W1,W2,W3,W4]

?(Side PLayer == East): DeathCamArray=[E1,E2,E3,E4]

Have tried multiple times and this doesn't work. Can't figure out why....the method seems perfectly logical (could it be a syntax error?)

All that happens when a person dies is they go to seagull mode. I tried flying high to force back into spec mode and I got this error:

'DeathCamCurTarget = (DeathCamArray l#l select _DeathCamIndex)'

Error Zero divisor

Thanks again for your help folks....maybe one of you can shed some light on this problem.

Share this post


Link to post
Share on other sites

When I use the spectator script I have been modifying it to run from an action instead of seagull mode. When I run it from an action those commands work.

Perhaps when in seagull mode it strips you of your side. If this is the case you may want to set an integer variable at the start of the mission based on the side of that client and then use that variable to determine which array to use.

Share this post


Link to post
Share on other sites

That is exactly correct....checked in the biki....once dead your side is considered civilian. Could you elaborate on the integer thing.....I'm very new to scripting. Thanks!

Share this post


Link to post
Share on other sites

Put something like this in init.sqs

Do NOT do a publicvariable as you want the clients to maintain the values they get for a result.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

?(side Player == West): MySide = 1

?(side Player == East): MySide = 2

Then change the array set to:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

DeathCamArray=[]

?(MySide==1): DeathCamArray=[W1,W2,W3,W4]

?(MySide==2): DeathCamArray=[E1,E2,E3,E4]

Share this post


Link to post
Share on other sites

Can anyone get this working in 1.06 (using 1.4)

ssmc3.jpg

init line 9

?(side Player == West): MySide = 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×