Jump to content
fin_soldier

Spectating without Spoiling

Recommended Posts

Hello,

 

I'm figuring out a way for dead players to spectate without all the entities visible,

or even better by only being able to spectate from 3rd and 1st person view of any other player.

 

I hope someone is experienced with this.

Thank is advance! :)

Share this post


Link to post
Share on other sites
1 hour ago, Erwin23p said:

You should check the end game spectator mode and BIS_fnc_EGSpectator. I didn't try it but it should be easy to configure it to only allow first or third person spectating.

 

Would you know how to initiate this when a player dies and there are no respawn tickets left?

 

In description.ext or init.sqf for example.

Share this post


Link to post
Share on other sites
On 5/29/2020 at 8:42 AM, fin_soldier said:

 

Would you know how to initiate this when a player dies and there are no respawn tickets left?

 

In description.ext or init.sqf for example.

 

*Forgive me if I get it wrong, as English is not my native language and I use the web translator to communicate.

 

A few weeks ago I was looking for and helping a colleague how to make Spectator Mode work when the player die, and that the camera was not allowed to move freely around the map, but only remained in view of the player still alive in the game.

So with help right here in the forum with questions and discoveries testing combinations of command line we got where we wanted, which in my opinion is more or less what you are looking for.

 

To start the spectator mode we use a command which is to start in the "onPlayerKilled.sqf" file, and to end the spectator we use another command inside the "onPlayerRespawn.sqf" file.

 

Inside in file ""onPlayerKilled.sqf"

/// command line to save the loadout
_player = _this select 0;
[_player, [_player, "SavedInventory"]] call BIS_fnc_saveInventory;

/// start spectator mode
["Initialize", [player, [], false, false, true, false, true, false, false, true]] call BIS_fnc_EGSpectator;

Inside in file ""onPlayerKilled.sqf"

/// Command line that retrieves the last loadout saved in "BIS_fnc_saveInventory" that the character carried when he died
_player = _this select 0;
[_player, [_player, "SavedInventory"]] call BIS_fnc_loadInventory;


/// Stop Espectator Mode

["Terminate"] call BIS_fnc_EGSpectator;

 

To end the mission if the Tickets run out and everyone is dead, I used a condition inside a trigger.

 

COND
[player,nil,true] call BIS_fnc_respawnTickets == 0 && {alive _x} count allPlayers isEqualTo 0;

On Actv

["End1",false, true] remoteExecCall ["BIS_fnc_endMission"] 


From which this above expects the tickets to be reset and all players dead, for which this is true he executes the command that ends the mission.

 

Here is the test mission we tested to get to where we wanted. > https://1drv.ms/u/s!AvZrCEHeJxl_mtJztTLIJUNZZ-2htQ?e=LXrkf8

I hope this helps you in something.

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

×