Move Player in Direction He is Facing in Ghost Shooter tut?

Just started using Construct 2? Post your questions here

Post » Sun Jun 29, 2014 2:17 am

Hello,

Quick question -- after following the 1st Beginner tutorial 'Ghost Shooter' I am wondering how to make the player move forward in the direction he is facing when the up arrow is pressed, instead of actually 'up' (no matter which way he is facing) ? ... this default method of 8-direction behavior from the tutorial is not intuitive for character control.

That is the only thing I want to change from the tutorial. Have the player move forward in the direction relative to his facing angle (the facing angle should still be controlled by facing the mouse cursor).

A sample capx would be most helpful. Thanks!
B
11
S
2
Posts: 86
Reputation: 1,001

Post » Sun Jun 29, 2014 4:41 pm

I believe this control of yours is not as intuitive as you might think...

If facing was also controlled by the keyboard (left & right arrows) I would agree with you. But with facing being controlled by the mouse, moving with up & down feels terrible. :)

Anyway, here's the capx:

http://examples.gamesintheattic.com/ghost_shooter_custom.capx

(For some bizarre reason I cannot attach the capx to the post)
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 659
Reputation: 3,845

Post » Sun Jun 29, 2014 5:44 pm

Kind Sir, thank you so much for your help! You may be correct, but I would like to experiment.

Unfortunately, when I try to open your example capx it tells me my version of C2 is not compatible (it tells me I have an older version) -- so, I went to check to make sure I have the latest, and the current download from Scirra is what I have: (release 173, 64bit) free version.
B
11
S
2
Posts: 86
Reputation: 1,001

Post » Sun Jun 29, 2014 5:47 pm

He's using the latest beta, you can grab that from: https://www.scirra.com/construct2/releases/r174
Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
127
S
43
G
18
Posts: 2,240
Reputation: 20,592

Post » Sun Jun 29, 2014 8:16 pm

Cool ... I installed it, and checked it out -- just the thing I was looking to experiment with -- very helpful.

(I had previously tried also using the example of car behaviors here (which also adds strafing), and also just change a custom key in 8 direction beahior to move a certain # of pixels (results were jerky).

I do think this is a little better... well, actually both are somewhat awkward - I see what you mean by adding left and right, which should be easy to do using your example. Thanks!
B
11
S
2
Posts: 86
Reputation: 1,001

Post » Sun Jun 29, 2014 8:23 pm

p.s. Are there any other recommended examples of good movement control modifications to the ghost shooter type of game? (I've seen the WASD tut, and the turret one.)
B
11
S
2
Posts: 86
Reputation: 1,001


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests