Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Comment:
Migrated to Confluence 5.3
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 | ||||||
---|---|---|---|---|---|---|
| ||||||
function eventResearched(research, structure) {
// do stuff
} |
Parameters
Parameter | Type | Mandatory | Description | Game version |
---|---|---|---|---|
research | Research object | An object describing the research that has been completed. | 3.1 | |
structure | Structure object | 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 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
eventResearched(research, structure) {
if (structure) pursueResearch(structure, myResearchPath);
} |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Requires:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Div | ||
---|---|---|
| ||
See alsoRelated articles:
|