Jump to content
Sign in to follow this  
JacobJ

Spectating after dead

Recommended Posts

Hello

I have a mission and I want players to be able to spectate the players on his team who are still alive. I want the dead players to be spectating the alive players in first person view and they must have the option to switch wich alive player they want to spectate.

How do I do this?

/Jacob

Share this post


Link to post
Share on other sites

Indeed...a search of spectate or spectating also works.

*****************

Thank you HeinBloed You are my hero

I've been searching forever for a spectate script (posts and threads) and never saw anything that works great....I recently came across this working spectating script in a user's mission. Even now, I can't seem to find a gdtmod post through search ..who knows maybe its on page 70 buried in the forums somewhere.....cant find it

So, i wanted to share with all this fantastic spectate script by gdtmod.

FINALLY A WORKING SPECTATE SCRIPT that works exactly how we need it to work. (Perfect for our style of coop play) Magnificent sir!

http://www.gdt-server.net/

Perhaps i just missed the post on this spectate script somewhere. I hope this helps someone find this spectating script as it is awesome. CHEERS

spectating script, 3rd person, 1st person, scope, night vision, stutter-less free camera...has it all and works flawlessly :)

a true masterpiece...cudos

ADDED LINK 10/1

DOWNLOAD HERE:

http://www.filefront.com/17340483/GDT.zip

Share this post


Link to post
Share on other sites

Hello all

Here is what I want:

When a player in my mission dies, he has to go into first person view of the nearest friendly soldier. The only thing he will be able to do is to spectate this player. When this player dies, he and the new dead soldier has to go on to the nearest soldier and spectate from their.

Can this be made? I have looked at the spectating scripts out their and I must say they are advanced and have to many features (which I dont know how to disable to get to where I want)

Hope you can help

/Jacob

Share this post


Link to post
Share on other sites

I have tried with the switchCamera, but that doesnt stay on the player. How do I tell the dead player to run a script?

Share this post


Link to post
Share on other sites

A killed eventhandler and then the createCam, camcommit, cameraeffect and setcameratarget. Should that do the job? I just read that if I just wanted the spectating to be first person with no other features I should use the switchCamera, but that I can't get to work. Any suggestions on that?

Share this post


Link to post
Share on other sites

I have tried the eventhandler and I have got it to run a script. The problem is now, that I dont know what to put into the script.

I want the VIEW from the switchCamera command, but that is not an option with the cameraEffect command?

---------- Post added at 08:53 PM ---------- Previous post was at 08:43 PM ----------

Okay, didnt see all the replies..DOH

Well I have looked at those scripts, but they seem to be very complicated.

They also have some features I don't want. I only want dead players to be able to follow their own teammates and only in a first person view or in the view the player he is spectating is using at the moment (like the VIEW feature of switchCamera command).

Where do I have to change the codes for this to be done?

Share this post


Link to post
Share on other sites

Could I somehow set in something like:

If (playerside == WEST) then

and so on? insteed of being able to spectate everyone?

Share this post


Link to post
Share on other sites

Okay I have now tried out Norrins Spectating script and it looks very much like the thing I need. There is just one problem. That scripts comments state that you only can see players you are friendly with, but I can see everybody. Somehow I suspect this code to be the problem, but I can't see whats the problem:

_t = createTrigger["EmptyDetector", (getPos player) ];

_t setTriggerType "NONE";

_t setTriggerStatements ["this", "NORRNAllUnits = thislist", ""];

_t setTriggerArea[50000, 50000, 0, false];

_t setTriggerActivation["ANY", "PRESENT", false];

sleep 2;

{if(side _x != sideLogic) then {_foo = _foo + [_x]}} forEach NORRNAllUnits;

{if (alive _x) then {_allUnits = _allUnits + (crew _x)}} forEach _foo;

Share this post


Link to post
Share on other sites

there should be an option in Norrins init_revive.sqf or somewhere that allows you to select which sides or all to spectate, its in the magic never heard of it called readme.

If norrins spectating script is not same or a seperate one i bet there is a readme for that to or online instructions ;)

Share this post


Link to post
Share on other sites

The spectating script seems to be a seperate script (but proberbly the same) as the spectating script in the revive script. It must be a bug in the script, because Norrin comments in top of the script that only friendly units can be spectated and that is not true by me, I can see all units in the mission.

I just can't find out, where the problem is in the script. My best guess is in that code I have posted, but again, me a newbie spotting bugs in complex code isnt the best combo I guess...

Share this post


Link to post
Share on other sites

Okay, so I would have to make two different scripts to be run. One for the WEST team and one for the EAST team?

Share this post


Link to post
Share on other sites

without any specific knowledge i would say yes, but: if any global variables are used by either script it will conflict with eachother.

_myVariable = local one. can only be changed and acessed within the script.

myvariable = gloabal one. can be changed and acessed from outside of script.

Share this post


Link to post
Share on other sites

Okay, I remember that. I will try to make two scripts and see if I can get it to work that way around. Ill update when I have tested it.

Share this post


Link to post
Share on other sites

That didnt work. I suspect the "NORRNAllUnits = thislist" part to be a problem, but what do I know. Can I somehow define that "thislist" so it only contains WEST units?

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  

×