Comrades in Arms Discussion Board

Full Version: Disable Spectator FreeCam
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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
Why would you ever want to do that? Not being able to spectate when you die is just a drag
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).
hmmm I don't know. Personally I think that would be very annoying. I like the spectating as it is, why mess with it?
I can understand the need sometimes to prevent players from seeing further while spectating and spoil the mission for themselves.
(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
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
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
Glad you've found a solution RueLight Smile
updated OP with full description how it works
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
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...wedgroups/

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.
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.
I think that not being able to use the free camera mode while in spectator mode should be a CiA standard.
(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.
Pages: 1 2