Need help with 8Direction

Get help using Construct 2

Post » Thu May 22, 2014 3:31 pm

Hey guys,

first, my english is not really good, i hope you will understand my problem.
I made a map (1440 x 1080) and a small guy which i want to control trough the Map. (Map: )
If i move around with my character in the map, its like there is a big Cross trough the whole map, where my character can't past trough. (I try to show you what i mean: Green: I can move around, Red: i get blocked )

Is this a bug, or did i something wrong?

I hope you guys can help me with this. If you are German, it would be really helpfull to me, if you can help me in german, but english should be also okay :D


Regards
KiiBa
You do not have the required permissions to view the files attached to this post.
Last edited by KiiBa on Thu May 22, 2014 5:25 pm, edited 1 time in total.
B
3
Posts: 10
Reputation: 193

Post » Thu May 22, 2014 3:59 pm

You don't yet have enough rep to post links so we can't see the image you are linking.

Can you post your capx? That would actually give a better idea of what is going on anyway. An image doesn't allow me to look at what objects you have on the layout and the collision bounds for the objects.
B
40
S
12
G
11
Posts: 331
Reputation: 7,752

Post » Thu May 22, 2014 4:15 pm

Thanks for the fast answer, i'm sorry, i didn't know that.
What do you mean with "capx"?
B
3
Posts: 10
Reputation: 193

Post » Thu May 22, 2014 4:38 pm

That is the file extension for a project in Construct, if you save it as a single file. Basically, find your saved project and attach it to your post. I will download it, open it and take a look at what is going on.
B
40
S
12
G
11
Posts: 331
Reputation: 7,752

Post » Thu May 22, 2014 5:26 pm

Okay, here it is
B
3
Posts: 10
Reputation: 193

Post » Thu May 22, 2014 5:46 pm

Ok, it was what I thought. Your collision bounds are not set to what you think they are. Below is a picture of the actual collision bounds:

Capture.PNG


As you can see, this is your MapWalls image. You are trying to get collisions according to where the black lines are on this image. Construct doesn't work that way. The blue lines with red dots are the actual collision bounds set. When an image is imported, Construct tries to create a collision polygon automatically but, in cases like your image, it is impossible. The collision polygon expects a single enclosed area to wrap. With a map of walls, there is no real enclosed portion. To get the result you want, remove collisions from the wall image, add a new rectangle object called wall and place it along the places you want collisions to happen. You will have 1 instance of the wall for each wall in the image.

I hope that helps and good luck with your project.
You do not have the required permissions to view the files attached to this post.
B
40
S
12
G
11
Posts: 331
Reputation: 7,752

Post » Thu May 22, 2014 6:10 pm

Okay, i see the problem, and i know what you mean.
But i don't know Construct very well, and i have no idea how can make collision at more different parts :/
B
3
Posts: 10
Reputation: 193

Post » Thu May 22, 2014 6:25 pm

See this edited version of your project. The upper left 3 buildings have the wall object. In game the walls are set to invisible so the player only sees your background image. You would have to do the same for all the buildings.
You do not have the required permissions to view the files attached to this post.
B
40
S
12
G
11
Posts: 331
Reputation: 7,752

Post » Thu May 22, 2014 9:04 pm

Yay it actually works, thank you so much.
Can you explain me what do you had to change that the red Wall get work as collision? (I bet this english is not english lol)
I want try to understand Construct 2, cause i really like making video games :)

Again thank you for your help!
B
3
Posts: 10
Reputation: 193

Post » Fri May 23, 2014 3:05 am

The red wall is a sprite with the solid behavior. It's not an image like yours was. You have to place a single sprite on each wall of the background. Try to move 1 of the red lines in the editor and you'll see what I mean.
B
40
S
12
G
11
Posts: 331
Reputation: 7,752

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 31 guests