Switching Layouts Issues

0 favourites
  • 4 posts
  • I'm having some issues switching between layouts.

    Currently I've built a TestMap layout that uses a simple map with Wall objects and has Minions move through the map using Pathfinding, adding the Walls object as a Obstacle before generating the path. This works great.

    I then created a second layout to work as a intro screen for the map. Essentially it has a text area with some blurb and then a start button the uses System > Go To Layout TestMap to load the map. Again this works as it should however now when the TestMap is loaded the minions ignore the Walls as Obstacles.

    Nothing has been changed in TestMap and it still works if set to be the first loaded Layout or if run directly from Construct.

    I can't post the CAPX file just now due to it being an active development project, however if a demo is needed I can create a new project to replicate the problem and post that.

  • Without seeing the events it's difficult to be certain, but it sounds like the pathfinding is being calculated before or at the same time as the walls thus returning zero on a variable.

    Try adding an at start of layout condition to "test map" layout and create the walls there...

    On start of layout triggers will ensure that event is the first to be executed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not sure that's the issue as the Walls are fixed objects (placed as part of the layout, not dynamically) and the minions don't try to Pathfind until the users spawns them, and I've tried waiting a bit before spawning but it doesn't seem to make a difference.

    I'm not sure what you mean by calling Start Of Layout then creating the walls there as the walls are pre-placed objects so positioning them would be a pain to do hardcoded.

  • sorry I thought "adding the Walls object as a Obstacle" meant they were being generated at runtime...

    maybe a screen grab of your relevant events?

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