Problems with Rotate Layer and Bullet Angles

Get help using Construct 2

Post » Mon Jan 09, 2012 5:25 am

I'm trying to work on a game for the Rotary Comp. I'm making it so when the player walks over certain tiles it rotates the layout and changes the gravity angle, but when the character shoots after the layout rotates, all the bullet objects I spawn refuse to have their angle set.

For example. while the layout is at the default orientation, the player can shoot left or right (depending on the direction they're facing). When the layout is rotated -90 degrees ALL bullets shoot in the same direction regardless of my attempts to rotate them.

CAPX FileCerbyn2012-01-09 12:02:39
B
14
G
3
Posts: 16
Reputation: 2,469

Post » Mon Jan 09, 2012 8:21 am

Please post your capx so we can help you.
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Mon Jan 09, 2012 12:03 pm

Added the CAPX file to the original post.

Also here.

How to replicate issue:
  1. Press 'Z' to shoot. (note that it shoots in the direction the player is facing)
  2. Walk right until you touch the Elder Sign (red star), rotating the world clockwise.
  3. Shoot left and right. Shooting either way results in bullets shooting to the right.
Cerbyn2012-01-09 12:13:41
B
14
G
3
Posts: 16
Reputation: 2,469

Post » Mon Jan 09, 2012 2:11 pm

bulletAngle.capx

I simplified the capx, I think it was a bit too early to split all into different eventsheet... always hard to read for others.

Well anyway it seems the set angle of motion is a bit bugged, I switched to set angle and that works fine (event 30 and 31)

Oh damn! A big sprite for the whole level?... crazy guy, use tiled background and some neatly splitted sprites (you could event use them for collision detection... 2 birds with one stone)
Last edited by Yann on Sun Sep 14, 2014 10:15 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Mon Jan 09, 2012 4:50 pm

Thanks for the help, and for the critique on my work so far. I'm so gonna mention you in the credits :P

The single level sprite was just for ease of use while I'm in the early stages. Later on it'll be in separate tiles. It's just easier to use my map editor program (Tiled) to make them for testing purposes.
B
14
G
3
Posts: 16
Reputation: 2,469

Post » Mon Jan 09, 2012 7:28 pm

Hehe Tiled. I wondered for a moment if we couldn't somehow make a plugin to read tiled map and automatically create the corresponding map.
I'm still thinking about it.
Well.. Anyway custom plugins aren't allowed fot the contest v__v
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Mon Jan 09, 2012 7:38 pm

@yann

You might be able to get points for separate layers, but collisions for polygons... I think it would be pretty slow.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767


Return to How do I....?

Who is online

Users browsing this forum: h1k3 and 17 guests