Event-based movements & collisions

Get help using Construct 2

Post » Tue Dec 03, 2013 8:17 am

@R0j0hound Thanks man, this is pretty solid! Kind of confused by the collideCheck function though - I didn't know you could use them that way. Also what is the purpose of events 11 & 12? Removing them doesn't seem to change anything.MadFactory2013-12-03 08:37:49
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Tue Dec 03, 2013 9:17 am

I used the collideCheck function instead of using the events directly because I just wanted to know if the player is colliding, I don't want to pick the walls. The only reason for that was the nested overlap check in event 12; it needed to check with all the walls not just picked ones. Event 10 moves the player to the position it was at at the start of the frame, then events 11 and 12 move the player again but only a pixel at a time in the same direction. This is to close the gap with the wall. The player's d variable is reduced by the amount moved. This is important so the wall sliding can only go the remaining distance.
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Previous

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 23 guests