Xcom Enemy Unknown Console - Commands
exec function SpawnUnit(name UnitTemplateName, optional vector SpawnLoc)
`log("Added" @ Amount @ ResourceType);
if( Console == None ) Console = new(self) class'XComDevConsole'; return Console;
function XGStrategy GetStrategy()
function Console GetConsole()
exec function UnlockAllTechs()
local XGUnit selected; selected = XComTacticalController(GetALocalPlayerController()).GetSelectedUnit(); if(selected != none) selected.TakeDamage(9999, selected.Location, vect(0,0,0), none, true); xcom enemy unknown console commands
if( WorldInfo.Game != None )
class XComDevConsole extends XComConsole config(DevConsole); // Exec functions are automatically callable from console exec function GiveResource(name ResourceType, int Amount)
WorldInfo.Game.SetConsole( new(self) class'XComDevConsole' ); exec function SpawnUnit(name UnitTemplateName
// Create unit based on template kUnit = TacticGRI.m_kBattle.m_kUnitMgr.CreateUnit(UnitTemplateName, SpawnLoc, eTeam_Alien); kUnit.InitUnit(); In XComGameEngine ’s Init() or LoadMap() :
case 'Cash': strat.GetResource().AddCash(Amount); break; case 'Alloys': strat.GetResource().AddAlloys(Amount); break; case 'Elerium': strat.GetResource().AddElerium(Amount); break; case 'Meld': strat.GetResource().AddMeld(Amount); break; default: `log("Unknown resource type");
// Example: Spawn Sectoid or Soldier local XComTacticalGRI TacticGRI; local XGUnit kUnit; if(selected != none) selected.TakeDamage(9999
TacticGRI = XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI); if(TacticGRI == none) return;
Override XComGame ’s console getter: