The best way to walk around "background" objects

Get help using Construct 2

Post » Wed Apr 13, 2016 3:43 pm

Message: Skvor can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hello,
I am completely new in this program And I have never done coding so I might ask silly question.
I'm making short hiding game.

Image

For some time I was unable to find any similar project or topic regarding this problem. Perhaps i was asking the wrong questions.

Image

I wonder what would be the best way to make these big bushes and other object, so I can go around. I would be behind if above, and walk over when being below. There should be a lot of these object, each functioning also as a protection against line of sight.

I'm trying to achieve something like this famous game done in GM, except there are no working game mechanics in that one.
https://youtu.be/pHAJi8kAPsY?t=117

I would be glad for any direction.

thank you
B
4
Posts: 9
Reputation: 218

Post » Wed Apr 13, 2016 4:00 pm

Hi Skvor,

this may help you out: https://www.scirra.com/tutorials/4981/s ... den-player

You have to change the z-ordering for your player. With that tutorial you may cover up all your questions; instead of showing the silhouette (if you dont want to), just leave that art blanc.
This could also help you out: viewtopic.php?f=147&t=129745&p=969922&hilit=ordering+isometric#p969922 (ignore that its about isometrics; its z-ordering what you'll need).

Have a great day,
Proxy
B
24
S
14
G
9
Posts: 118
Reputation: 6,799

Post » Wed Apr 13, 2016 4:00 pm

you simply want to make you movement of your character have an 8 direction movement on it (without rotating the angle) so that you character can walk up and down the fake perpective ground.

Then place the bushes on the ground as needed. And only draw the collision box for the bushes around the bottom like you drew the red area.

Then you add a condition that checks if the player is above or below the bushes, and puts the player or the bush in front or behind the player in Z order. (this concept is called "Z-Sorting" if you want to read up more about it.

There are a few plugins that make this easier to handle.

Here's one by rex rainbow
https://github.com/downloads/rexrainbow ... zSorter.7z
B
87
S
44
G
16
Posts: 1,009
Reputation: 17,946

Post » Wed Apr 13, 2016 7:51 pm

You are great guys. This is big help. Thank you both so much for quick response !
B
4
Posts: 9
Reputation: 218

Post » Wed Apr 13, 2016 8:14 pm

@skvor - Great artwork btw!
B
87
S
44
G
16
Posts: 1,009
Reputation: 17,946


Return to How do I....?

Who is online

Users browsing this forum: jezjones24 and 12 guests