Versions Compared

Key

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

Overview

Excerpt

...

Triggered when a new technology has been researched by you or an ally...

 

Overview

The event is also triggered when you gain technology by picking up an artefact (something that an AI cannot currently do, but a human ally can).

Syntax

Code Block
theme

...

RDark
languagejavascript
linenumberstrue
function eventResearched(research, structure) {
  // do stuff
}

Parameters

ParameterTypeMandatoryDescriptionGame version
researchResearch object(tick)An object describing the research that has been completed.3.1
structureStructure object(error)

An object describing the structure that completed the research (a research lab), if applicable.

If the research was completed in one of your labs, this will be the structure object for that RESEARCH lab.

The parameter will be undefined if the research was completed by one of your allies, or gifted via a script, etc.

3.1

Example

Code Block
theme

...

RDark
languagejavascript
titleSet a new research task for the lab that completed current research
linenumberstrue
eventResearched(research, structure) {
  if (

...

structure) pursueResearch(structure, myResearchPath);
}

...

For more information on starting research, see pursueResearch().

...

Div
classbox
Availability
Status
colourGreen
titleStable

Requires:

  • Warzone 3.1 Beta 1 or above
Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Div
classbox

See also

Related articles: