Author Topic: Mapscript question  (Read 3347 times)

Offline Nord

  • Commander
  • *****
  • Posts: 1637
  • The Gate is open.
    • View Profile
Mapscript question
« on: December 30, 2016, 04:03:46 pm »
I really dont understand how all the mapscripts works? but its okay.
For now, i can not understand how to put flat mapblocks under xcom craft.
For example, tftd island terror:
Code: [Select]
  - type: ISLAND_TERROR
    commands:
    - type: addBlock
      size: 2
      groups: 2
      rects:
        - [0,3,5,2]
    - type: addBlock
      size: 2
      groups: 3
      rects:
        - [0,3,5,2]
    - type: addBlock
      groups: 4
      rects:
        - [0,4,5,1]
    - type: addCraft
    - type: addBlock
      size: 2
      executions: 4
    - type: fillArea
First three commands putting shoreline, then goes craft, then 4 times big blocks, then just filling the rest area. How a craft become on the flat?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Mapscript question
« Reply #1 on: December 30, 2016, 04:16:52 pm »
addCraft automatically places map blocks under the craft that are marked as group 1 for landing zones, and those blocks are generally flat and open to accommodate craft.  You can override this behavior by giving the addCraft command blocks: or groups:, but you have to be careful so you don't end up with blocked exits, clipping through objects, or half of the craft floating above the terrain.

Code: [Select]
    - type: addCraft
      groups: [0, 1] #allow group 0 blocks to be chosen too
      blocks: [0, 1, 2] #chose block 0, 1, or 2 from terrain to place under craft, overrides groups.

Offline Nord

  • Commander
  • *****
  • Posts: 1637
  • The Gate is open.
    • View Profile
Re: Mapscript question
« Reply #2 on: December 30, 2016, 07:19:25 pm »
map blocks under the craft that are marked as group 1 for landing zones
There is answer. I missed it, or it was not described anywhere... anyway, thank you.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Mapscript question
« Reply #3 on: December 30, 2016, 07:39:17 pm »
There is answer. I missed it, or it was not described anywhere... anyway, thank you.

You can find this info here:

https://www.ufopaedia.org/index.php?title=Ruleset_Reference_Nightly_(OpenXcom)#Guidelines.2FTips

Offline Nord

  • Commander
  • *****
  • Posts: 1637
  • The Gate is open.
    • View Profile
Re: Mapscript question
« Reply #4 on: December 30, 2016, 09:45:16 pm »
Oh, well... I readed this article, but pay no attention. Now i see it, when i know what to search for. Thanks again.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Mapscript question
« Reply #5 on: December 30, 2016, 11:12:22 pm »
Oh, well... I readed this article, but pay no attention. Now i see it, when i know what to search for. Thanks again.

I wrote the MapScripts section - any feedback on how to make it clearer would be welcome :)

Offline Nord

  • Commander
  • *****
  • Posts: 1637
  • The Gate is open.
    • View Profile
Re: Mapscript question
« Reply #6 on: December 31, 2016, 09:23:14 am »
Well, not with my english to give advices. Maybe put it right in a table?


Groups.      1-landing zone
                    2-road...