How do I move a sprite vertically

Just started using Construct 2? Post your questions here

Post » Thu Apr 09, 2015 12:26 pm

hi,

I am very much impressed by construct 2 but I Have few questions as a noob . .....

I want to make a game where character move automatically in vertical direction & user have to control just the left & right direction .....

Could you tell me as how to do that ......

Mike
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

Post » Thu Apr 09, 2015 12:57 pm

The question isn't very clear..
Do you want the player to move up constantly, or down, or go up and down in regular or irregular intervals?

Is the game like an endless runner, but vertically?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Apr 09, 2015 2:51 pm

I want the sprite to move up constantly but player only controls the player right & left movement of the player just like Bouncing Ball Game on IOS

Link - h***s://itunes.apple.com/in/app/bouncing-ball/id949505469?mt=8

Thanks again !!!!
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

Post » Thu Apr 09, 2015 2:57 pm

add 8 direction to your player (default controls off) and in an event sheet do every tick - player simulate control up and these two keyboard (add keyboard object) on right arrow pressed - player simulate control right and same for left just change to left arrow key and left in simulate control. Hope this helped (Search top down construct 2)
B
3
Posts: 9
Reputation: 193

Post » Thu Apr 09, 2015 3:18 pm

I'd recommend opening the infinite jumping example from the new-project-dialog.
It sounds a bit like what you are trying to achieve..

So open up Construct2
click new project
in the search type jumping
and the example will be there.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Apr 09, 2015 4:26 pm

Vedal987 wrote:add 8 direction to your player (default controls off) and in an event sheet do every tick - player simulate control up and these two keyboard (add keyboard object) on right arrow pressed - player simulate control right and same for left just change to left arrow key and left in simulate control. Hope this helped (Search top down construct 2)


Using 8 direction on player & using keyboard object I set both left key to left & right key to right on keyboard but some how my characters rotate if a obstacle comes in between using left or right key ( I have used solid on plan box obstacle ) so how can i stop the player to rotate .....

I just want to use left & right key so that user play would make the player slide left or right not want the object to rotate .....

Thanks for help again !!!
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

Post » Thu Apr 09, 2015 4:48 pm

Image
B
61
S
23
G
7
Posts: 1,466
Reputation: 10,696

Post » Thu Apr 09, 2015 5:21 pm

Thanks for quick reply .

I finally got my desired movement using 8 direction & platform on player but now I want to cancel our the rotation that happens why I press left or right key ?

Also could you help me with how to end the game when player sprite collide with a solid object ??
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

Post » Sat Apr 11, 2015 12:16 pm

To end game can't you just make an on collision with end object, go to layout watever you want? be more specific do you want another level or an end screen where it tells you your score?
B
3
Posts: 9
Reputation: 193

Post » Sat Apr 11, 2015 1:22 pm

Thanks for a quick reply !!!

Almost got all my diff solved here !!!

thanks everyone !!!!
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest