Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

List all technologies that can you can start researching immediately...

 

Syntax

Code Block
themeRDark
languagejavascript
linenumberstrue
var technologies = enumResearch();

Parameters

The function does not have any parameters.

Return values

ValueTypeNotesGame Version
<technologies>Array of
Research object
If technologies are available for research, an array of their associated research objects will be returned.3.1 Beta 1
[]Empty ArrayIf no technologies are currently available for research, an empty array is returned.3.1 Beta 1
<error>ErrorInternal error3.1 Beta 1

Example

Code Block
themeRDark
languagejavascript
titleGet labs to research whatever is available...
linenumberstrue
// get list of technologies available for research
var technologies = enumResearch();
 
// do we have stuff to research?
if (technologies.length) {
	// get a list of labs
	var labs = enumStruct( me, RESEARCH_LAB );
 
	labs.forEach( function(lab) {
		// is lab idle?
		if ( (lab.status == BUILT) && structureIdle(lab) ) {
			// make it research first technology in list
			pursueResearch( lab, technologies.shift() );
		}
	} );
}
Div
classbox
Availability
Status
colourGreen
title3.1 b1+

Requires:

  • Warzone 3.1 Beta 1 or above
Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Div
classbox

See also

Related articles: