Question Setting LOD dvars for other players

spiceyboi

Member
Messages
9
Reaction score
3
Points
8
Is this possible? I want to set the r_lodBiasRigid and r_lodBiasSkinned dvars for other players when they connect to a zombies game but it doesn't seem to actually work for them. Here's my script, what am I doing wrong?

/*
* Black Ops 2 - GSC Studio by iMCSx
*
* Creator : name
* Project : LodofChanger
* Mode : Zombies
* Date : 2019/09/06 - 10:51:44
*
*/

#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes_zm\_hud_util;
#include maps\mp\gametypes_zm\_hud_message;

init()
{
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;:wink:
{
level waittill("connected", player);
player thread onPlayerSpawned();
player iprintln("testmessage");
// BiasRigid
if( getDvarint("r_LodBiasRigid") == 0)
setDvar("r_LodBiasRigid", "-1000");
// BiasSkinned
if( getDvarint("r_LodBiasSkinned") == 0)
setDvar("r_LodBiasSkinned", "-1000");
// no Dof
if( getDvarint("r_dof_enable") == 1)
setDvar("r_dof_enable", "0");
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;:wink:
{
self waittill("spawned_player");
// BiasRigid
if( getDvarint("r_LodBiasRigid") == 0)
setDvar("r_LodBiasRigid", "-1000");
// BiasSkinned
if( getDvarint("r_LodBiasSkinned") == 0)
setDvar("r_LodBiasSkinned", "-1000");
// No Dof
if( getDvarint("r_dof_enable") == 1)
setDvar("r_dof_enable", "0");
}
}
 

Harry

Certified Sick ℂunt
Premium Member
Messages
1,263
Reaction score
969
Points
973
Print the values of the dvar upon spawning in... Are you sure they're 0?

Edit - Try a dvar editor (like CabCons) and see if there is a max (/min) value.
 

spiceyboi

Member
Messages
9
Reaction score
3
Points
8
Print the values of the dvar upon spawning in... Are you sure they're 0?

Edit - Try a dvar editor (like CabCons) and see if there is a max (/min) value.

I know the values are 0 by default for LODs and the max is -1000, as for DOF it's 1 by default and can be changed to 0. (off) I tried adding

init()
{
setdvar("r_lodBiasRigid", "-1000");
setdvar("r_lodBiasSkinned", "-1000");
setdvar("r_dof_enable", "0");

at the start but it still only work for me and not other players
 

Harry

Certified Sick ℂunt
Premium Member
Messages
1,263
Reaction score
969
Points
973
I know the values are 0 by default for LODs and the max is -1000, as for DOF it's 1 by default and can be changed to 0. (off) I tried adding

init()
{
setdvar("r_lodBiasRigid", "-1000");
setdvar("r_lodBiasSkinned", "-1000");
setdvar("r_dof_enable", "0");

at the start but it still only work for me and not other players
Most likely a variable that is client-based... You won't be able to change this, only the client can (they need to have a JB) - Call it in a Cbuf_AddText in a RTM/SPRX and you should be able to enable this for non-host.
 

AssumingAgate

Reverse Engineer
Messages
109
Reaction score
88
Points
903
Is this possible? I want to set the r_lodBiasRigid and r_lodBiasSkinned dvars for other players when they connect to a zombies game but it doesn't seem to actually work for them. Here's my script, what am I doing wrong?

/*
* Black Ops 2 - GSC Studio by iMCSx
*
* Creator : name
* Project : LodofChanger
* Mode : Zombies
* Date : 2019/09/06 - 10:51:44
*
*/

#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes_zm\_hud_util;
#include maps\mp\gametypes_zm\_hud_message;

init()
{
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;:wink:
{
level waittill("connected", player);
player thread onPlayerSpawned();
player iprintln("testmessage");
// BiasRigid
if( getDvarint("r_LodBiasRigid") == 0)
setDvar("r_LodBiasRigid", "-1000");
// BiasSkinned
if( getDvarint("r_LodBiasSkinned") == 0)
setDvar("r_LodBiasSkinned", "-1000");
// no Dof
if( getDvarint("r_dof_enable") == 1)
setDvar("r_dof_enable", "0");
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;:wink:
{
self waittill("spawned_player");
// BiasRigid
if( getDvarint("r_LodBiasRigid") == 0)
setDvar("r_LodBiasRigid", "-1000");
// BiasSkinned
if( getDvarint("r_LodBiasSkinned") == 0)
setDvar("r_LodBiasSkinned", "-1000");
// No Dof
if( getDvarint("r_dof_enable") == 1)
setDvar("r_dof_enable", "0");
}
}
what console are you wanting this to be done on? and are you wanting it in gsc or does it not matter because there are other ways to set dvars for all clients on bo2
 
Top