8 Direction, but follow mouse

Get help using Construct 2

Post » Sat Jan 11, 2014 1:08 pm

Someone suggested to me that my top down shooter game might be a little better if I could have the main player follow the cursor (On Aim) while still moving in a direction.

Currently it does follow the cursor to aim but if I'm holding down a key to move in a direction it only aims and shoots in that direction until I release then it turns to the mouse.

Is there a way for me to set that up to still move in 8 directions and still follow the mouse on aim?

Thank you in advance for your help.

Here is my game if you want a better visual of what I have.

Demo Game

Thanks
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
31
S
14
G
3
Posts: 356
Reputation: 5,144

Post » Sun Jan 12, 2014 1:27 am

You could try:

* Every Tick - Set Player position to Mouse.X & Mouse.Y
* Player is moving - set animation to "Walking"
* INVERT: Player is(not) moving - set animation to "Still"

You may have to play around with it a lil but if what you're tryna do is get the player's position to match that of the cursor's then that should do it.
B
6
S
2
Posts: 151
Reputation: 1,366

Post » Sun Jan 12, 2014 1:31 am

Using those events you wouldnt need the 8-direction behavior since movement is based of the acceleration of the cursor & not of inputted controls like the keyboard which is a seperate object from the mouse in C2
B
6
S
2
Posts: 151
Reputation: 1,366

Post » Sun Jan 12, 2014 1:39 am

I must be doing something wrong then because it is on 8 direction...

here is a game I found this is the type of moment I'm talking about.

http://www.scirra.com/arcade/addicting-shooter-games/11770/soldiershooter-alpha

I'm not sure why it's not...

ThanksALLMarkMade2014-01-12 05:26:58
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
31
S
14
G
3
Posts: 356
Reputation: 5,144

Post » Sun Jan 12, 2014 2:48 am

Without seeing your capx I can't say where you are going wrong but have a look at the ghost shooter (tutorial demo) that comes with construct 2 - sounds like that should contain just what you are after. (also see the tutorial that it is based on)
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests