Changes between Version 4 and Version 5 of Ticket #3008


Ignore:
Timestamp:
Apr 8, 2023, 9:41:50 PM (13 months ago)
Author:
Langbart
Comment:
  • use syntax highlighting for the .xml part - wiki/WikiProcessors
    • remove the <![CDATA[...]]> part, because it is not needed for executing the code inside the Script tags

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3008 – Description

    v4 v5  
    1 With #2984, maps can have garrisoned units (useful for example for nomad sea map). This is set in the script map in its xml file. If holder is the GarrisonHolder entity, and ent1, ent2, ... the entities to garrison, the script would be
     1With #2984, maps can have garrisoned units (useful for example for nomad sea map). This is set in the script map in its `.xml` file. If `holder` is the `GarrisonHolder` entity, and `ent1, ent2, entN` the entities to garrison, the script would be:
    22
    3 <Script><![CDATA[//
    4 let cmpGarrisonHolder = Engine.QueryInterface(holder, IID_GarrisonHolder);
     3{{{#!xml
     4<?xml version="1.0" encoding="UTF-8"?>
     5<Scenario version="7">
     6<Script>
     7let cmpGarrisonHolder = Engine.QueryInterface(holder, IID_GarrisonHolder)
    58if (cmpGarrisonHolder)
    6         cmpGarrisonHolder.initGarrison = [ent1, ent2, ...];
    7 //]]></Script>
     9        cmpGarrisonHolder.initGarrison = [ent1, ent2, entN];
     10</Script>
     11}}}
    812
    913Atlas should be able to deal with such garrisoned units: