moving player with up and down control

Forum Home Forum Home > Construct 2 General > How do I....?
 Post Reply Post Reply Page  12>
Author
10,437 Rep
Post Options Post Options   Quote mina Quote  Post ReplyReply Direct Link To This Post Topic: moving player with up and down control
    Posted: 27 Mar 2012 at 1:44pm
Hi,

I want to create a player with controls like the controls on this video

http://www.youtube.com/watch?v=R_9JlC_-MZ8

1. The player is moving forward all the time
2. pressing top arrow make it goes up (not jumping)
3. pressing down arrow make it goes down (not sitting)

So do i need to set a bullet behavior to the player? if yes, how can i make it goes up and down to collect and void things?

Thanks.
Back to Top
1,064 Rep
Post Options Post Options   Quote Dado Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 2012 at 2:15pm
Maybe you can use a Custom Movement

I'll try to do it for my game too. If i succeed i'll post you an example.

Edited by Dado - 27 Mar 2012 at 2:26pm
Back to Top
10,437 Rep
Post Options Post Options   Quote mina Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 2012 at 2:48pm
@Dado

I already tried to do it using custom movement like here



But, i was thinking of something more real, so i will try the car movement may be "i never tried it before and i don't know if it's fit for this case" or the bullets with angles.

Thanks anyway for ur help :)
Back to Top
1,064 Rep
Post Options Post Options   Quote Dado Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 2012 at 3:43pm
Let me know if it fits that i would like to use the same behaviour. Thanks!
Back to Top
6,488 Rep
Post Options Post Options   Quote Nimtrix Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 2012 at 4:46pm
How about something like this?
Back to Top
1,064 Rep
Post Options Post Options   Quote Dado Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 2012 at 6:36pm
Nimtrix solution seems to work.
I tried a solution with car behavior that works but you could not associate it with a bullet movement to "move" the background as Nimtrix do. And the movement seems to be "not real".

Here the sample

I work to another solution based on samples i found on forum.
That's the result.
I think is the best solution: infinite background scrolling with two images (with Nimtrix solution you have to put a very long background) - no bullet behavior - 8direction(up-down) on object to move - the movement seems to be more "real". Hope you enjoy it.
(Use up - down arrows to move)

Here the second sample

Edited by Dado - 27 Mar 2012 at 8:03pm
Back to Top
10,437 Rep
Post Options Post Options   Quote mina Quote  Post ReplyReply Direct Link To This Post Posted: 28 Mar 2012 at 10:33am
@Nimtrix & @Dado

Thanks 4 ur examples :)

What if i want to create the same moving sprite but with jump and sit, do u thing it's better to use bullet behavior for moving forward with platform behavior for jump and sit?
Back to Top
1,064 Rep
Post Options Post Options   Quote Dado Quote  Post ReplyReply Direct Link To This Post Posted: 28 Mar 2012 at 10:39am
I think you can modify my last sample (which doesn't use the bullet behavior for moving forward but scroll-left the background to give the movement sensation), substitute 8direction(up-down) with a total 8direction and add platform behavior for jump and sit.
I'll try this evening on this solution.
If u can try before and have the solution uploading it here will be very appreciate. ^^
Back to Top
10,437 Rep
Post Options Post Options   Quote mina Quote  Post ReplyReply Direct Link To This Post Posted: 28 Mar 2012 at 11:26am
@Dado

Here is what i did so far with the bullet and platform behaviors.

http://dl.dropbox.com/u/52040403/bullet%20with%20platform.capx

Please take a look.

Just one problem i want the jump to be in a curve way not straight to top. how can i do that?
Back to Top
10,437 Rep
Post Options Post Options   Quote mina Quote  Post ReplyReply Direct Link To This Post Posted: 28 Mar 2012 at 11:40am
I think we can make it jump in a curve by set the player position while jump and fall like this example

http://dl.dropbox.com/u/52040403/bullet%20with%20platform2.capx
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down