Difference between revisions of "Script/LevelReference"
From SF3
(Created page with "==class LevelReference== === Class Methods === {| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpad...") |
|||
Line 1: | Line 1: | ||
==class LevelReference== | ==class LevelReference== | ||
− | + | The main interface for interacting with the level the player is currently in. | |
+ | |||
=== Class Methods === | === Class Methods === | ||
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7' | {| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7' | ||
Line 7: | Line 8: | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''RegisterHeroPartyEvent''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnHeroPartyEvent|TOnHeroPartyEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sTargetName'', const [[../BasicDataTypes|uint8]] ''_Faction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''RegisterHeroPartyEvent''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnHeroPartyEvent|TOnHeroPartyEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sTargetName'', const [[../BasicDataTypes|uint8]] ''_Faction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''register an event concerning the hero party'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''RegisterInventoryEvent''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnInventoryEvent|TOnInventoryEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sTargetName'', const [[../BasicDataTypes|uint8]] ''_Faction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''RegisterInventoryEvent''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnInventoryEvent|TOnInventoryEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sTargetName'', const [[../BasicDataTypes|uint8]] ''_Faction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''register an event concerning the hero party's inventory'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''RegisterCreatureEventByDescription''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnCreatureEvent|TOnCreatureEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sDescriptionName'', const [[../BasicDataTypes|uint8]] ''_Faction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''RegisterCreatureEventByDescription''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnCreatureEvent|TOnCreatureEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sDescriptionName'', const [[../BasicDataTypes|uint8]] ''_Faction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''register creature event by description name'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''RegisterCreatureEventByIndividual''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnCreatureEvent|TOnCreatureEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sCreatureName'') | | style='color: black; width: 90%; line-height: 0.8;' | '''RegisterCreatureEventByIndividual''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnCreatureEvent|TOnCreatureEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sCreatureName'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''register creature event by individual creature name (e.g.'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''RegisterBuildingEventByDescription''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnBuildingEvent|TOnBuildingEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sDescriptionName'', const [[../BasicDataTypes|uint8]] ''_Faction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''RegisterBuildingEventByDescription''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnBuildingEvent|TOnBuildingEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sDescriptionName'', const [[../BasicDataTypes|uint8]] ''_Faction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''register building event by description name'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''RegisterBuildingEventByIndividual''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnBuildingEvent|TOnBuildingEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sBuildingName'') | | style='color: black; width: 90%; line-height: 0.8;' | '''RegisterBuildingEventByIndividual''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnBuildingEvent|TOnBuildingEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sBuildingName'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''register building event by individual building name (i.e.'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''RegisterUIEvent''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnUIEvent|TOnUIEvent@]] ''_pFunction'', const [[../BasicDataTypes|uint8]] ''_Faction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''RegisterUIEvent''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnUIEvent|TOnUIEvent@]] ''_pFunction'', const [[../BasicDataTypes|uint8]] ''_Faction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''register an event to be called when a certain event happens in the ui of the given faction's player'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''RegisterUIEventByDescription''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnUIEntityEvent|TOnUIEntityEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sDescriptionName'', const [[../BasicDataTypes|uint8]] ''_Faction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''RegisterUIEventByDescription''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnUIEntityEvent|TOnUIEntityEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sDescriptionName'', const [[../BasicDataTypes|uint8]] ''_Faction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''register an event to be called when a certain event happens in the ui of the given faction's player'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''RegisterUIEventByIndividual''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnUIEntityEvent|TOnUIEntityEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sTargetName'', const [[../BasicDataTypes|uint8]] ''_Faction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''RegisterUIEventByIndividual''' (const [[../BasicDataTypes|string]]&in ''_sEventTypeName'', [[../TOnUIEntityEvent|TOnUIEntityEvent@]] ''_pFunction'', const [[../BasicDataTypes|string]]&in ''_sTargetName'', const [[../BasicDataTypes|uint8]] ''_Faction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''register an event to be called when a certain event happens in the ui of the given faction's player'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../World|World@]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../World|World@]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetWorld''' () | | style='color: black; width: 90%; line-height: 0.8;' | '''GetWorld''' () | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get world'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Random|Random@]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Random|Random@]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetRandom''' () | | style='color: black; width: 90%; line-height: 0.8;' | '''GetRandom''' () | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get the random number generator'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../HeroParty|HeroParty@]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../HeroParty|HeroParty@]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetHeroParty''' (const [[../BasicDataTypes|uint8]] ''_uFaction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''GetHeroParty''' (const [[../BasicDataTypes|uint8]] ''_uFaction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get the hero party for the given faction'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Sector|Sector@]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Sector|Sector@]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetSectorByName''' (const [[../BasicDataTypes|string]]&in ''_sName'') | | style='color: black; width: 90%; line-height: 0.8;' | '''GetSectorByName''' (const [[../BasicDataTypes|string]]&in ''_sName'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get sector script class by name'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Sector|Sector@]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Sector|Sector@]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetSectorByIndex''' (const [[../BasicDataTypes|uint]] ''_uIndex'') | | style='color: black; width: 90%; line-height: 0.8;' | '''GetSectorByIndex''' (const [[../BasicDataTypes|uint]] ''_uIndex'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get sector script class by index'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Building|Building]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Building|Building]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetBuildingByName''' (const [[../BasicDataTypes|string]]&in ''_sName'') | | style='color: black; width: 90%; line-height: 0.8;' | '''GetBuildingByName''' (const [[../BasicDataTypes|string]]&in ''_sName'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get building by name'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Building|Building]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Building|Building]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetBuildingById''' (const [[../BasicDataTypes|uint]] ''_uId'') | | style='color: black; width: 90%; line-height: 0.8;' | '''GetBuildingById''' (const [[../BasicDataTypes|uint]] ''_uId'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get building by id'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Creature|Creature]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Creature|Creature]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetCreatureByName''' (const [[../BasicDataTypes|string]]&in ''_sName'') | | style='color: black; width: 90%; line-height: 0.8;' | '''GetCreatureByName''' (const [[../BasicDataTypes|string]]&in ''_sName'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get creature by name'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Creature|Creature]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Creature|Creature]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetCreatureById''' (const [[../BasicDataTypes|uint]] ''_uId'') | | style='color: black; width: 90%; line-height: 0.8;' | '''GetCreatureById''' (const [[../BasicDataTypes|uint]] ''_uId'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get creature by id'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../LogicObject|LogicObject]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../LogicObject|LogicObject]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetLogicObjectByName''' (const [[../BasicDataTypes|string]]&in ''_sName'') | | style='color: black; width: 90%; line-height: 0.8;' | '''GetLogicObjectByName''' (const [[../BasicDataTypes|string]]&in ''_sName'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get logic object by name'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../LogicObject|LogicObject]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../LogicObject|LogicObject]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetLogicObjectById''' (const [[../BasicDataTypes|uint]] ''_uId'') | | style='color: black; width: 90%; line-height: 0.8;' | '''GetLogicObjectById''' (const [[../BasicDataTypes|uint]] ''_uId'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get logic object by id'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../ResourceDeposit|ResourceDeposit]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../ResourceDeposit|ResourceDeposit]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetResourceDepositByName''' (const [[../BasicDataTypes|string]]&in ''_sName'') | | style='color: black; width: 90%; line-height: 0.8;' | '''GetResourceDepositByName''' (const [[../BasicDataTypes|string]]&in ''_sName'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get resource deposit by name'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../ResourceDeposit|ResourceDeposit]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../ResourceDeposit|ResourceDeposit]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetResourceDepositById''' (const [[../BasicDataTypes|uint]] ''_uId'') | | style='color: black; width: 90%; line-height: 0.8;' | '''GetResourceDepositById''' (const [[../BasicDataTypes|uint]] ''_uId'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get resource deposit by id'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Entity|Entity]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Entity|Entity]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''GetEntityById''' (const [[../BasicDataTypes|uint]] ''_uId'') | | style='color: black; width: 90%; line-height: 0.8;' | '''GetEntityById''' (const [[../BasicDataTypes|uint]] ''_uId'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get any entity (creature, building, etc.) by its id'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Building|Building]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Building|Building]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''FindBuildingByDescription''' (const [[../BasicDataTypes|uint8]] ''_uFaction'', const [[../BasicDataTypes|string]]&in ''_sDescriptionName'') | | style='color: black; width: 90%; line-height: 0.8;' | '''FindBuildingByDescription''' (const [[../BasicDataTypes|uint8]] ''_uFaction'', const [[../BasicDataTypes|string]]&in ''_sDescriptionName'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''find building by description in the given faction. if more than one building using this description exists, returns the first one found.'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Creature|Creature]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Creature|Creature]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''FindCreatureByDescription''' (const [[../BasicDataTypes|uint8]] ''_uFaction'', const [[../BasicDataTypes|string]]&in ''_sDescriptionName'') | | style='color: black; width: 90%; line-height: 0.8;' | '''FindCreatureByDescription''' (const [[../BasicDataTypes|uint8]] ''_uFaction'', const [[../BasicDataTypes|string]]&in ''_sDescriptionName'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''find creature by description in the given faction. if more than one creature using this description exists, returns the first one found.'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''TransferFactionAssets''' (const [[../BasicDataTypes|uint8]] ''_SourceFaction'', const [[../BasicDataTypes|uint8]] ''_DestinationFaction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''TransferFactionAssets''' (const [[../BasicDataTypes|uint8]] ''_SourceFaction'', const [[../BasicDataTypes|uint8]] ''_DestinationFaction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''transfer ownership of all buildings and units of _uSourceFaction to _uDestFaction'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''DestroyFactionAssets''' (const [[../BasicDataTypes|uint8]] ''_Faction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''DestroyFactionAssets''' (const [[../BasicDataTypes|uint8]] ''_Faction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''destroy or kill all buildings and creatures belonging to the given faction'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''DamageFactionAssets''' (const [[../BasicDataTypes|uint8]] ''_Faction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''DamageFactionAssets''' (const [[../BasicDataTypes|uint8]] ''_Faction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''apply damage to all buildings and creatures belonging to the given faction'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''SetFactionRelation''' (const [[../BasicDataTypes|uint8]] ''_FactionA'', const [[../BasicDataTypes|uint8]] ''_FactionB'', const [[../BasicDataTypes|string]]&in ''_sRelation'') | | style='color: black; width: 90%; line-height: 0.8;' | '''SetFactionRelation''' (const [[../BasicDataTypes|uint8]] ''_FactionA'', const [[../BasicDataTypes|uint8]] ''_FactionB'', const [[../BasicDataTypes|string]]&in ''_sRelation'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''set the relation between the two given factions.'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''WinGame''' (const [[../BasicDataTypes|uint8]] ''_Faction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''WinGame''' (const [[../BasicDataTypes|uint8]] ''_Faction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''show the victory screen to the given faction'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''LoseGame''' (const [[../BasicDataTypes|uint8]] ''_Faction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''LoseGame''' (const [[../BasicDataTypes|uint8]] ''_Faction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''show the defeat screen to the given faction'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''BlockNavMesh''' (const [[../BasicDataTypes|string]]&in ''_sName'', const [[../BasicDataTypes|bool]] ''_bBlocked'') | | style='color: black; width: 90%; line-height: 0.8;' | '''BlockNavMesh''' (const [[../BasicDataTypes|string]]&in ''_sName'', const [[../BasicDataTypes|bool]] ''_bBlocked'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''activate or deactivate the nav blocker with the given name'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''ActivateSpawn''' (const [[../BasicDataTypes|string]]&in ''_sName'', const [[../BasicDataTypes|bool]] ''_bActive'') | | style='color: black; width: 90%; line-height: 0.8;' | '''ActivateSpawn''' (const [[../BasicDataTypes|string]]&in ''_sName'', const [[../BasicDataTypes|bool]] ''_bActive'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''activate the spawn of the given name'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''ActivateAI''' (const [[../BasicDataTypes|uint8]] ''_Faction'') | | style='color: black; width: 90%; line-height: 0.8;' | '''ActivateAI''' (const [[../BasicDataTypes|uint8]] ''_Faction'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''activate an existing AI for the given faction'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''ShowTutorial''' (const [[../BasicDataTypes|uint8]] ''_Faction'', const [[../BasicDataTypes|string]]&in ''_sTutorialName'') | | style='color: black; width: 90%; line-height: 0.8;' | '''ShowTutorial''' (const [[../BasicDataTypes|uint8]] ''_Faction'', const [[../BasicDataTypes|string]]&in ''_sTutorialName'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''show the given tutorial, provided that it has not already been shown.'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''ShowTutorial''' (const [[../BasicDataTypes|uint8]] ''_Faction'', const [[../BasicDataTypes|string]]&in ''_sTutorialName'', const [[../Entity|Entity]]&in ''_Target'') | | style='color: black; width: 90%; line-height: 0.8;' | '''ShowTutorial''' (const [[../BasicDataTypes|uint8]] ''_Faction'', const [[../BasicDataTypes|string]]&in ''_sTutorialName'', const [[../Entity|Entity]]&in ''_Target'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''show the given tutorial, provided that it has not already been shown.'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''ShowNotification''' (const [[../BasicDataTypes|uint8]] ''_Faction'', const [[../BasicDataTypes|string]]&in ''_sNotificationName'', const [[../Entity|Entity]]&in ''_Location'') | | style='color: black; width: 90%; line-height: 0.8;' | '''ShowNotification''' (const [[../BasicDataTypes|uint8]] ''_Faction'', const [[../BasicDataTypes|string]]&in ''_sNotificationName'', const [[../Entity|Entity]]&in ''_Location'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''show a one-off notification at the given location for the given faction.'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''BeginNotification''' (const [[../BasicDataTypes|uint8]] ''_Faction'', const [[../BasicDataTypes|string]]&in ''_sNotificationName'', const [[../Entity|Entity]]&in ''_Location'') | | style='color: black; width: 90%; line-height: 0.8;' | '''BeginNotification''' (const [[../BasicDataTypes|uint8]] ''_Faction'', const [[../BasicDataTypes|string]]&in ''_sNotificationName'', const [[../Entity|Entity]]&in ''_Location'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''begin an ongoing notification at the given location for the given faction.'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''EndNotification''' (const [[../BasicDataTypes|uint8]] ''_Faction'', const [[../BasicDataTypes|string]]&in ''_sNotificationName'', const [[../Entity|Entity]]&in ''_Location'') | | style='color: black; width: 90%; line-height: 0.8;' | '''EndNotification''' (const [[../BasicDataTypes|uint8]] ''_Faction'', const [[../BasicDataTypes|string]]&in ''_sNotificationName'', const [[../Entity|Entity]]&in ''_Location'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''end an ongoing notification at the given location for the given faction.'' | ||
|} | |} |
Revision as of 08:55, 1 September 2016
class LevelReference
The main interface for interacting with the level the player is currently in.
Class Methods
void | RegisterHeroPartyEvent (const string&in _sEventTypeName, TOnHeroPartyEvent@ _pFunction, const string&in _sTargetName, const uint8 _Faction) |
register an event concerning the hero party | |
void | RegisterInventoryEvent (const string&in _sEventTypeName, TOnInventoryEvent@ _pFunction, const string&in _sTargetName, const uint8 _Faction) |
register an event concerning the hero party's inventory | |
void | RegisterCreatureEventByDescription (const string&in _sEventTypeName, TOnCreatureEvent@ _pFunction, const string&in _sDescriptionName, const uint8 _Faction) |
register creature event by description name | |
void | RegisterCreatureEventByIndividual (const string&in _sEventTypeName, TOnCreatureEvent@ _pFunction, const string&in _sCreatureName) |
register creature event by individual creature name (e.g. | |
void | RegisterBuildingEventByDescription (const string&in _sEventTypeName, TOnBuildingEvent@ _pFunction, const string&in _sDescriptionName, const uint8 _Faction) |
register building event by description name | |
void | RegisterBuildingEventByIndividual (const string&in _sEventTypeName, TOnBuildingEvent@ _pFunction, const string&in _sBuildingName) |
register building event by individual building name (i.e. | |
void | RegisterUIEvent (const string&in _sEventTypeName, TOnUIEvent@ _pFunction, const uint8 _Faction) |
register an event to be called when a certain event happens in the ui of the given faction's player | |
void | RegisterUIEventByDescription (const string&in _sEventTypeName, TOnUIEntityEvent@ _pFunction, const string&in _sDescriptionName, const uint8 _Faction) |
register an event to be called when a certain event happens in the ui of the given faction's player | |
void | RegisterUIEventByIndividual (const string&in _sEventTypeName, TOnUIEntityEvent@ _pFunction, const string&in _sTargetName, const uint8 _Faction) |
register an event to be called when a certain event happens in the ui of the given faction's player | |
World@ | GetWorld () |
get world | |
Random@ | GetRandom () |
get the random number generator | |
HeroParty@ | GetHeroParty (const uint8 _uFaction) |
get the hero party for the given faction | |
Sector@ | GetSectorByName (const string&in _sName) |
get sector script class by name | |
Sector@ | GetSectorByIndex (const uint _uIndex) |
get sector script class by index | |
Building | GetBuildingByName (const string&in _sName) |
get building by name | |
Building | GetBuildingById (const uint _uId) |
get building by id | |
Creature | GetCreatureByName (const string&in _sName) |
get creature by name | |
Creature | GetCreatureById (const uint _uId) |
get creature by id | |
LogicObject | GetLogicObjectByName (const string&in _sName) |
get logic object by name | |
LogicObject | GetLogicObjectById (const uint _uId) |
get logic object by id | |
ResourceDeposit | GetResourceDepositByName (const string&in _sName) |
get resource deposit by name | |
ResourceDeposit | GetResourceDepositById (const uint _uId) |
get resource deposit by id | |
Entity | GetEntityById (const uint _uId) |
get any entity (creature, building, etc.) by its id | |
Building | FindBuildingByDescription (const uint8 _uFaction, const string&in _sDescriptionName) |
find building by description in the given faction. if more than one building using this description exists, returns the first one found. | |
Creature | FindCreatureByDescription (const uint8 _uFaction, const string&in _sDescriptionName) |
find creature by description in the given faction. if more than one creature using this description exists, returns the first one found. | |
void | TransferFactionAssets (const uint8 _SourceFaction, const uint8 _DestinationFaction) |
transfer ownership of all buildings and units of _uSourceFaction to _uDestFaction | |
void | DestroyFactionAssets (const uint8 _Faction) |
destroy or kill all buildings and creatures belonging to the given faction | |
void | DamageFactionAssets (const uint8 _Faction) |
apply damage to all buildings and creatures belonging to the given faction | |
void | SetFactionRelation (const uint8 _FactionA, const uint8 _FactionB, const string&in _sRelation) |
set the relation between the two given factions. | |
void | WinGame (const uint8 _Faction) |
show the victory screen to the given faction | |
void | LoseGame (const uint8 _Faction) |
show the defeat screen to the given faction | |
void | BlockNavMesh (const string&in _sName, const bool _bBlocked) |
activate or deactivate the nav blocker with the given name | |
void | ActivateSpawn (const string&in _sName, const bool _bActive) |
activate the spawn of the given name | |
void | ActivateAI (const uint8 _Faction) |
activate an existing AI for the given faction | |
void | ShowTutorial (const uint8 _Faction, const string&in _sTutorialName) |
show the given tutorial, provided that it has not already been shown. | |
void | ShowTutorial (const uint8 _Faction, const string&in _sTutorialName, const Entity&in _Target) |
show the given tutorial, provided that it has not already been shown. | |
void | ShowNotification (const uint8 _Faction, const string&in _sNotificationName, const Entity&in _Location) |
show a one-off notification at the given location for the given faction. | |
void | BeginNotification (const uint8 _Faction, const string&in _sNotificationName, const Entity&in _Location) |
begin an ongoing notification at the given location for the given faction. | |
void | EndNotification (const uint8 _Faction, const string&in _sNotificationName, const Entity&in _Location) |
end an ongoing notification at the given location for the given faction. |