How do I avoid character from going up wall?

Just started using Construct 2? Post your questions here

Post » Sat Sep 03, 2016 5:29 pm

So, as I'm learning this engine, I have a few questions.
1. I took Nes's Double Dragon's 1st level background and made it my layout. I made Billy (character) a 3 sprite/frame animation. I put on constant loop so even when he stops walking, he stays in place, but feet keep going. How do I make him look like he is standing still when I have him stop?

2. I gave him 8 directional movement, but when I press up or down he keeps the walking motion, but tries walking up walls either sideways or upside down. I need for him to stop where the sidewalk/street meets the building walls, but how?

3. I have a two frame jump animation, but can't figure out how to implement it in to Construct and make him jump?

All help would be appreciated.
B
32
S
15
G
10
Posts: 91
Reputation: 7,639

Post » Sun Sep 04, 2016 12:40 am

1. Give him an idle animation and play that on 'Is moving' action inverted.
2. Give the buildings and any other obstacles the solid behaviour.
3. Jumping is preset of the platform behaviour, maybe it would be easier to use that?
B
46
S
16
G
77
Posts: 2,159
Reputation: 45,833

Post » Sun Sep 04, 2016 2:37 am

Thanks. I will give it a shot. I can forsee one problem; the whole layout of buildings and street are one sheet. That's how I downloaded and inserted it. Is there a way to limit how high he can walk, set a screen position he can't reach?
B
32
S
15
G
10
Posts: 91
Reputation: 7,639

Post » Sun Sep 04, 2016 3:08 am

Can you not do this with collision?
B
46
S
16
G
77
Posts: 2,159
Reputation: 45,833

Post » Mon Sep 05, 2016 4:41 pm

I think I need to restart and create a solid sidewalk and paste those tiles on the bottom half of the screen.
My problem is, I'm trying to follow some of the tutorials, but I'm not having much luck with the events.
I basically want to recreate the 1st level of Nes's Double Dragon, just to understand Construct better and then build my own game.
I pasted the 1st level 512x512, (and tried 640x480)not sure what the background white layer Window size should be.

I imported Billy sprites and created the separate animation folders for Idle, Walk, Jump, Punch, Kick, Hit (gets hit), and Fall Down. I cropped each frame within their respective folders and also gave the 2 origin point. I gave Billy the Pin To Behavior as I created an invisible blue box sprite to be placed over him. I also gave Scroll to behavior to Blue box.

Do I give Billy or Blue a Box the 8 directional or platform or both behaviors?
Also, do I need to create a street/sidewalk sprite that he will be pinned to and I can paste it over my background covering the Games street?
I think I need to give a Keyboard behavior clicking on the layout.
I started with System, Every Tick, Billy, Set Position to Blue Box, 0 image point for first event.

Thanks for your help, if you can answer these ones, maybe I can figure a few more steps on my own.
B
32
S
15
G
10
Posts: 91
Reputation: 7,639

Post » Mon Sep 05, 2016 10:36 pm

For Double Dragon style beat em up I guess 8-direction will work fine, you don't need platform and the jump would just be an animation. What I think you might be looking for then is disabling 8-direction up presses when you hit a certain Y co-ord? That might work better if it's always going to be the same height in the level, or you can use collision of the objects around him. Not sure about your second question.
B
46
S
16
G
77
Posts: 2,159
Reputation: 45,833

Post » Wed Sep 14, 2016 4:21 am

@staleevolution:
The rotating character can be turned off if you go to the 8-direction behavior and turn “Set Angle” off.

I have a way that works for 2.5-D if you don’t need to jump over any objects or stand on top of objects. Give the 8-direction behavior to the player’s shadow, and put invisible solid objects where the floors of all your obstacles would be.

For jumping, you can use animations like @plinkie said. Alternatively, you can simulate jumping with events. I’ll include a short capx here (Google Drive is a little wierd. Just download the whole folder with the button at the top.).

Lastly, if you want to get even more precise, give the player’s shadow 2 copies of the 8-direction behavior, set one to just up & down, and set the other to just left & right. Then, to simulate perspective, set the max speed, acceleration, and deceleration for the up & down movement to some fraction of the values for left & right.
Eh, Steve!
B
115
S
54
G
13
Posts: 112
Reputation: 16,150

Post » Wed Sep 14, 2016 12:11 pm

Thank you. @plinkie I messed with the Y axis and it helped. @calebbennetts I will also have to try Set Angle off. So much to learn, but I will keep tinkering.

Thanks again.
B
32
S
15
G
10
Posts: 91
Reputation: 7,639


Return to Beginner's Questions

Who is online

Users browsing this forum: blackhornet and 2 guests