Comrades in Arms Discussion Board
Disable Spectator FreeCam - Printable Version

+- Comrades in Arms Discussion Board (http://forum.ciahome.net)
+-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3)
+--- Forum: Mission Making (http://forum.ciahome.net/forumdisplay.php?fid=8)
+--- Thread: Disable Spectator FreeCam (/showthread.php?tid=3442)

Pages: 1 2


Disable Spectator FreeCam - RueLight - 08-28-2016

Hi,

it's possible to turn off the "Free Cam" when you die?

this command isn't working... RscSpectator_allowFreeCam = false;


greets


edit 15.02.2017

Solution

normaly it should work over the  onPlayerKilled.sqf  but it doesnt at moment... it ends into a full blurred screen always.
arma wiki link

That why I execute my spectator via the eventhandler. how it works:

1. put this line in the init field of every playable unit

this addEventHandler ["killed", { _this spawn { sleep 7; BIS_DeathBlur ppEffectAdjust [0.0]; BIS_DeathBlur ppEffectCommit 0.0; ["Initialize", [soldier1, [west], false, false, true, true, true, true, true, true]] call BIS_fnc_EGSpectator; }}]

soldier1  =  name of the unit   (dont use "player", it could cause bugs)

2. in your description.ext write

respawn = "BIRD";
respawnDelay = 10;

3. in editor Multiplayer settings you need

[Image: 9Qwe6J7.jpg]

DONE

The trick is, coz of the respawn with bird, the blurred screen will disappear when the player died. sometimes is still can happend...
little trick, when you got blurry screen, move into your video settings and hide it Smile

when you got ideas to improve this let me know!

greets


RE: Disable Spectator FreeCam - McGregor - 08-28-2016

Why would you ever want to do that? Not being able to spectate when you die is just a drag


RE: Disable Spectator FreeCam - RueLight - 08-28-2016

U didnt understand me, i'm talking about the "Free Cam"

Spectating should be still possible, but just on players only (first or third person).


RE: Disable Spectator FreeCam - McGregor - 08-28-2016

hmmm I don't know. Personally I think that would be very annoying. I like the spectating as it is, why mess with it?


RE: Disable Spectator FreeCam - Variable - 08-28-2016

I can understand the need sometimes to prevent players from seeing further while spectating and spoil the mission for themselves.


RE: Disable Spectator FreeCam - RueLight - 08-29-2016

(08-28-2016, 07:38 PM)Variable Wrote: I can understand the need sometimes to prevent players from seeing further while spectating and spoil the mission for themselves.

thats the point.

is there perhaps a way with eventhandler to turn the screen into black when some spectator switch to freecam?! plz help me Smile


RE: Disable Spectator FreeCam - Varanon - 08-29-2016

Look at this page:

https://community.bistudio.com/wiki/EG_Spectator_Mode

Basically, you need to take over initialization of the spectator mode, via an onPlayerKilled.sqf script


RE: Disable Spectator FreeCam - RueLight - 08-30-2016

onplayerkilled.sqf  is not  working coz the blur effect doesn't disappear when you switch to spectator mode...

BUT

i tryed something different and combined it into this

in the INIT line of all playable units

Code:
this addEventHandler ["killed", { _this spawn { TitleCut ["   ","black out",1]; sleep 3; TitleCut ["   ","black in",3]; "DynamicBlur" ppeffectenable true; "dynamicBlur" ppEffectAdjust [6]; "dynamicBlur" ppEffectCommit 0; "dynamicBlur" ppEffectAdjust [0.0]; "dynamicBlur" ppEffectCommit 5; ["Initialize", [player, [west], false, false, true, true, true, true, true, false]] call BIS_fnc_EGSpectator; }}];


realy short isnt it?! Tongue
its working nice, also with some little fade effects too.

greets


RE: Disable Spectator FreeCam - Variable - 09-02-2016

Glad you've found a solution RueLight Smile


RE: Disable Spectator FreeCam - RueLight - 02-15-2017

updated OP with full description how it works


RE: Disable Spectator FreeCam - Alwarren - 02-15-2017

Actually, looking at the code of the spectator camera, it should even be easier than that. I haven't tested this yet, because I need two players at least, but adding this to your init.sqf should do the trick:

Code:
{
    _x setVariable ["AllowFreeCamera", false];

} forEach playableUnits;
Alternatively, in each player unit, add
this setVariable ["AllowFreeCamera", false];

As I said, untested, you'd need to try it out


RE: Disable Spectator FreeCam - RueLight - 02-16-2017

yeah i know this command, that was my first try to turn off free cam. wasnt working at me, but last test is a while ago.

https://forums.bistudio.com/topic/188533-spectator-attributes-not-working-rscspectator_allowfreecam-rscspectator_allowedgroups/

i think the EG Spectator Mode is the new upcoming function. you also can set more parameters there. Like i said, normaly it should work via onPlayerKilled.sqf but this cause blurred screen when you use BIS revive as well.


RE: Disable Spectator FreeCam - Alwarren - 02-16-2017

The above definitely works for making the spectators see all sides, including the AI, I'd be surprised if this specific attribute would not work. I'll give it a try

EDIT: I just tried setting the variable on the player and then calling

["Initialize", [player]] spawn BIS_fnc_EGSpectator;

and that worked. I'll try tomorrow during a mission. What might be an issue is setting the variable from within the units init field - I set the Whitelist stuff in init.sqf.


RE: Disable Spectator FreeCam - Variable - 02-16-2017

I think that not being able to use the free camera mode while in spectator mode should be a CiA standard.


RE: Disable Spectator FreeCam - McGregor - 02-16-2017

(02-16-2017, 04:52 PM)Variable Wrote: I think that not being able to use the free camera mode while in spectator mode should be a CiA standard.

I would have to strongly object to that. Limiting my movement of the spectating camera is something that I absolutely hate. I find it annoying and infuriating and I don't care at all about "spoiling" the mission for my self. If this was to become the norm I would just never spectate again.