Change of Layout Bug/glitch

Discussion and feedback on Construct 2

Post » Thu Aug 09, 2012 2:35 pm

Having a major issue with changing a layout on a platform based game.
I'm going to describe the problem as best I can as I am unable to upload the capx and I have been unable to repeat the problem in a new project so please bear with me.

The player is set to a basic Platform behaviour with custom key movement.


Layout 1 properties

Global Variables
PlayerX - 40
PlayerY - 4000
- Start of Layout - Set player position to (PlayerX, PlayerY)
- End of Layout - Set Global Variable to players current position



Layout 2 properties

Global Variables
NumberFall = 3

- Start of Layout - Set player position to (60, 3000)
- End of Layout   - Set NumberFall = 3

Player is outside layout
Numberfall is > 3              Set player position to (60, 3000)

Numberfall = 3   - Change to Layout 1



On the 2nd layout if the player falls outside of the layout then the player is set back to 60, 3000
After the 3rd fall the player is sent back to Layout 1

When the player re-clicks the link to return to the second layout the Player is being moved to the co-ords of 600, 600 and after it lands destroying itself.
No where in my code is that set to happen.


I really hope I've done enough to get some idea's from other people on how to solve this as I'm stumped.
Sorry again for not being able to upload a bugged capx for people to look at.
B
13
S
2
Posts: 87
Reputation: 1,244

Post » Thu Aug 09, 2012 4:25 pm

So more information I have found that has confused me even further.

I set up a key press that sends the player from the 1st Layout to the 2nd Layout.

This method is working perfectly no matter how many times I go back and forth.

Any idea's on why the clicking with a mouse button is causing issues when the event for clicking and keyboard press are identical apart from the difference between a mouse and a keyboard?
B
13
S
2
Posts: 87
Reputation: 1,244

Post » Thu Aug 09, 2012 4:39 pm

Found the problem, uploaded the version to a web server and tested it on several machines in case it was an error on my console.
Turns out the way the events where positioned inside of Construct was the problem.
The move player function was 3rd on the start of layout where it should have been in the 1st position.
Hope this helps anyone who may suffer a similar problem
B
13
S
2
Posts: 87
Reputation: 1,244


Return to Construct 2 General

Who is online

Users browsing this forum: chadorireborn, humanescape and 4 guests