Shooting bullets toward cursor WITHOUT aligning sprite

Just started using Construct 2? Post your questions here

Post » Fri Jan 30, 2015 1:27 am

I'm new to construct, so I apologize if this is a rather obvious question for those of you who are more experienced.

I'm trying to allow the player to shoot towards the cursor, but my game's perspective is top down with a slight angle so rotating the sprite freely does not work so well. Any tips?

I'm aiming for a mechanical movement similar to Nuclear Throne if any of you are familiar. Is there a way to cause my player to face in a cardinal direction based on where the cursor is relative to the player? (etc if cursor is between 45 and -45 degrees, use the right-facing sprites.)
B
3
Posts: 1
Reputation: 177

Post » Fri Jan 30, 2015 2:48 am

Uh, im completely new at this too so im not sure if this will even help, but something about the mouse aim :
OnRightButtonClicked> "Player" Spawn "bullet" on layer 0
"bullet" Set angle toward (Mouse.x, Mouse.y)

this worked for me, havent got a clue about the sprite change thing though.
B
7
S
1
Posts: 93
Reputation: 632

Post » Thu Sep 03, 2015 9:08 pm

I used this same technique but I seem to be getting a weird offset issue
Stuff I'm working on:



http://www.jamdonut.com
B
13
S
3
Posts: 88
Reputation: 1,025

Post » Thu Sep 03, 2015 9:46 pm

you can try with "is between angle" condition
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest