Author Topic: Looping through neigbours of a province?  (Read 3245 times)

Pollyfun

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Looping through neigbours of a province?
« on: October 31, 2015, 07:41:54 AM »
This asset looks great, so I'm evaluating if it contains the features I need for a strategy game I'm working on.

First questions is whether it's possible to loop through neighbours of a region?
Let's say I have selected a unit in Somerset region. Then I want to highlight the regions in
Devon, Dorset, Wiltshire, and Gloucestershire (possibly with green respectively red colors depending on owner).

So basically, input: 1 region, output: a list of neigbours (pointers).

It this supported?

Thanks


Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 8122
    • View Profile
    • Kronnect
Re: Looping through neigbours of a province?
« Reply #1 on: October 31, 2015, 09:12:48 AM »
Yes, it's supported.

Every Country or Province record has a Region object with a neighbours property which is a list of other regions surrounding it.

The demo scene shows the neighbours names when you move the mouse over any Region.

Pollyfun

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: Looping through neigbours of a province?
« Reply #2 on: October 31, 2015, 12:59:31 PM »
Good to hear  :)