Due to a sudden burst in spammer activity, account creation has been temporarily disabled. Sorry for the inconvenience to any new potential contributors.

AddDynGraphic

From AGEWiki

(Difference between revisions)
Jump to: navigation, search
(add Layer parameter)
 
Line 12: Line 12:
| example-description = This will display the '''Icon_PassBlocked.png''' graphic in Region '''Gorlitz''', with a location '''150 pixels right''' and '''150 pixels down''' from the upper left point of the region.  A tooltip '''strPassIsBlocked''' will appear on the graphic icon.
| example-description = This will display the '''Icon_PassBlocked.png''' graphic in Region '''Gorlitz''', with a location '''150 pixels right''' and '''150 pixels down''' from the upper left point of the region.  A tooltip '''strPassIsBlocked''' will appear on the graphic icon.
  Note: See [[RemDynGraphic]]
  Note: See [[RemDynGraphic]]
 +
 +
 +
 +
----
 +
 +
For Game Engines dated '''March 15, 2012''' or later, a special set of coordinates will specify a position which is relative to the center of the region, rather than as an offset from the upper left of the region.  This allows a Dynamic Graphic to be attached to a decision without knowing the region it will appear.
 +
 +
[[Image:DynGxSpeCoo.jpg|800 px]]
| param1 = RgnUID
| param1 = RgnUID
| param1desc = Alias of the Region selected
| param1desc = Alias of the Region selected
Line 21: Line 29:
| param4desc = If not NULL or -1, then the new terrain of the region (i.e $Mountain will transform the terrain of the region into mountainous terrain!).
| param4desc = If not NULL or -1, then the new terrain of the region (i.e $Mountain will transform the terrain of the region into mountainous terrain!).
| param5 = CooX
| param5 = CooX
-
| param5desc = Graphic offset in pixels to the right of the upper left point of region
+
| param5desc = Graphic offset in pixels to the right of the upper left point of region. ''Note special coordinates.''
| param6 = CooY
| param6 = CooY
-
| param6desc = Graphic offset in pixels down from the upper left point of region
+
| param6desc = Graphic offset in pixels down from the upper left point of region. ''Note special coordinates.''
| param7 = Tooltip
| param7 = Tooltip
| param7desc = Text to be displayed when mouse hovers on the graphic icon
| param7desc = Text to be displayed when mouse hovers on the graphic icon

Latest revision as of 21:59, 15 March 2012

AddDynGraphic

Syntax  

AddDynGraphic = <RgnUID>;<ImageName>;<AltWeatherImgName>;<TerrainUID>;<CooX>;<CooY>;<Tooltip>[;<Layer>]

Description

This command adds a graphic to a region, and may change the weather graphic or the terrain.

Example  

AddDynGraphic = $Gorlitz;Icon_PassBlocked.png;Icon_PassBlocked.png;NULL;150;150;strPassIsBlocked

AddDynGraphic.png


Spreadsheet of examples

This will display the Icon_PassBlocked.png graphic in Region Gorlitz, with a location 150 pixels right and 150 pixels down from the upper left point of the region. A tooltip strPassIsBlocked will appear on the graphic icon.

Note: See RemDynGraphic



For Game Engines dated March 15, 2012 or later, a special set of coordinates will specify a position which is relative to the center of the region, rather than as an offset from the upper left of the region. This allows a Dynamic Graphic to be attached to a decision without knowing the region it will appear.

DynGxSpeCoo.jpg


 

Parameters

RgnUID

Alias of the Region selected

ImageName

The Graphic to be displayed

AltWeatherImgName

The image to use if the weather of the region is harsh or very harsh (can be the same as above).

TerrainUID

If not NULL or -1, then the new terrain of the region (i.e $Mountain will transform the terrain of the region into mountainous terrain!).

CooX

Graphic offset in pixels to the right of the upper left point of region. Note special coordinates.

CooY

Graphic offset in pixels down from the upper left point of region. Note special coordinates.

Tooltip

Text to be displayed when mouse hovers on the graphic icon

Layer

OPTIONAL Indicates the display layer to use to show the graphic

region graphic is 1, miniflag is 3, siege indicator is 2, etc.) default = 1
Available only with Game Engine updates on or after February 15, 2012
Forums