Pathfinding problem involving teams.

0 favourites
  • 2 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Link to .capx file (required!):

    https://www.dropbox.com/s/umndm18ob93nk55/Game_pathfindingTest.capx

    Steps to reproduce:

    1. Setup 2 different spawn areas. (two teams, ie. blue and green)

    2. Create a blue team sprite with pathfinding behaviour (custom obstacles).

    i.   Spawn in respective spawn area.

    ii. Add opposing team spawn area to obstacle list.

    iii. Regenerate obstacle map.

    iv. Find a path somewhere in the layout.

    v.   Travel along path.

    3. Same as step 2 but with the green team.

    i - ii - iii - iv - v

    (Optional) If spawn areas placed to far for viewing, setup a method to observe the results. (eg, player sprite with 8Direction and ScrollTo behaviour)

    Observed result:

    Only one team actually moves as.

    From my personal observation, green team spawns and finds a way around but never into blue area; blue team, on the other hand, does not give a single pixel about the fact that green in infesting the area.

    Expected result:

    Adding green spawn area to blue's obstacles list allows blue to wander everywhere but into green spawn area.

    Vice-versa for green.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    OS: Windows 8

    SP: ?

    Construct 2 version:

    Construct 2: r132

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Closing as by design. There is only one global obstacle map, so you cannot add obstacles to one type which don't affect another. In other words, both green and blue are using both blueArea and greenArea as obstacles.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)