Switching Layouts Issues

Get help using Construct 2

Post » Sun Jan 26, 2014 3:31 am

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. JamesKrawczyk2014-01-26 05:10:10
B
4
Posts: 4
Reputation: 233

Post » Sun Jan 26, 2014 7:30 am

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.Pixel perfick2014-01-26 07:37:48
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,270

Post » Sun Jan 26, 2014 7:41 am

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.JamesKrawczyk2014-01-26 07:42:14
B
4
Posts: 4
Reputation: 233

Post » Sun Jan 26, 2014 7:49 am

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?
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,270


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests