Sign in to follow this  
Spiszy

How to set UAV always on.

Recommended Posts

Setting up a server of players vs bots, and wanting to add radar always on. I've tried adding setDvar("g_compassShowEnemies", "1"); to _weapons.gsc. However, it doesn't seem to actually enable it. Does anyone know how to get this to work? Thanks!

Share this post


Link to post
Share on other sites

Think these need to be enabled also

"scr_game_forceuav", 1,
 "ui_uav_allies", 1, or   "ui_uav_axis", 1 depending on what team your players are on.

These are setClientDvars if I am not mistaken

 

 

Share this post


Link to post
Share on other sites
14 hours ago, MANIC MINER said:

Think these need to be enabled also

"scr_game_forceuav", 1,
 "ui_uav_allies", 1, or   "ui_uav_axis", 1 depending on what team your players are on.

These are setClientDvars if I am not mistaken

 

 

It seems doing "scr_game_forceuav", 1 works when playing in a regular /map mp_map game. However, once put on a server, nothing seems to make the bots show up on radar. Almost as if its restricted for some reason. I've also tried doing self GiveWeapon("radar_mp"); to just spawn in a uav, however this doesn't seem to do it either.

Share this post


Link to post
Share on other sites
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\bots\_bot_utility;

init()
{
	level onPlayerConnecting();
}

onPlayerConnecting()
{
	for( ;; )
	{
	level waittill( "connected", player );
	player thread onPlayerConnected();
	}
}

onPlayerConnected()
{

	self endon("disconnect");
		self setClientDvars( "scr_game_forceuav", 1,
		"ui_uav_allies", 1,
		"g_compassShowEnemies", 1 );
			
		setDvar( "bg_fallDamageMinHeight", 300 ); // you can even set these here
		setDvar( "bg_fallDamageMaxHeight", 600 );
		
}

This worked for me and you call it from _callbacksetup.gsx

//	Callback Setup
//	This script provides the hooks from code into script for the gametype callback functions.

//=============================================================================
// Code Callback functions

/*================
Called by code after the level's main script function has run.
================*/
CodeCallback_StartGameType()
{
	// If the gametype has not beed started, run the startup
	if(!isDefined(level.gametypestarted) || !level.gametypestarted)
	{
		[[level.callbackStartGameType]]();

		level.gametypestarted = true; // so we know that the gametype has been started up
		
		level thread maps\mp\bots\_bot::init();
		level thread maps\mp\bots\_menu::init();
		level thread maps\mp\bots\_wp_editor::init();

		
		thread maps\mp\gametypes\_uav::init();

	}

 

Share this post


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

#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\bots\_bot_utility;

init()
{
	level onPlayerConnecting();
}

onPlayerConnecting()
{
	for( ;; )
	{
	level waittill( "connected", player );
	player thread onPlayerConnected();
	}
}

onPlayerConnected()
{

	self endon("disconnect");
		self setClientDvars( "scr_game_forceuav", 1,
		"ui_uav_allies", 1,
		"g_compassShowEnemies", 1 );
			
		setDvar( "bg_fallDamageMinHeight", 300 ); // you can even set these here
		setDvar( "bg_fallDamageMaxHeight", 600 );
		
}

This worked for me and you call it from _callbacksetup.gsx


//	Callback Setup
//	This script provides the hooks from code into script for the gametype callback functions.

//=============================================================================
// Code Callback functions

/*================
Called by code after the level's main script function has run.
================*/
CodeCallback_StartGameType()
{
	// If the gametype has not beed started, run the startup
	if(!isDefined(level.gametypestarted) || !level.gametypestarted)
	{
		[[level.callbackStartGameType]]();

		level.gametypestarted = true; // so we know that the gametype has been started up
		
		level thread maps\mp\bots\_bot::init();
		level thread maps\mp\bots\_menu::init();
		level thread maps\mp\bots\_wp_editor::init();

		
		thread maps\mp\gametypes\_uav::init();

	}

 

Much appreciated. Working perfectly. Thank you!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this