How do I rotate and move object at the same time

Get help using Construct 2

Post » Mon Feb 22, 2016 10:21 pm

I'm trying to make an event when the spacebar is held down, spin an object around my player object. I can move around perfectly with 8 direction behavior. As soon as the spacebar is held down, the secondary object starts rotating around as it should, but seems to shut off my movement. When the spacebar is released, I can move again. Any ideas what's conflicting? Thanks!
B
6
Posts: 30
Reputation: 310

Post » Mon Feb 22, 2016 11:01 pm

We'll need to see your event sheet to troubleshoot this. Can you post a capx?

An very unlikely possibility is that on some keyboards certain keys can't be pressed at the same time.
Mistakes were made.
B
52
S
26
G
109
Posts: 1,616
Reputation: 61,653

Post » Mon Feb 22, 2016 11:16 pm

Message: jaybien can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Sure, here it is

https://w w w dot dropbox.com/s/ailjjcxueirwqjp/Roelda.capx?dl=0
B
6
Posts: 30
Reputation: 310

Post » Tue Feb 23, 2016 12:02 am

That's a little different - your player object is doing the spinning, not an object spinning around your player.

8 direction behavior works based on setting the angle/direction of your player sprite, so if you change the player sprite's angle with events, it fights against your 8 direction behavior.

If you want your player sprite to spin and move with 8 direction, you can try using an animation for the spin.

Or have another separate sprite object pinned to your player sprite, that should be able to spin no problem while the player sprite moves.

A third way would be to have your player with 8 direction be invisible as a placeholder, and pin a sprite on top of that with the graphics and have that spin. (Same idea as second method)
Mistakes were made.
B
52
S
26
G
109
Posts: 1,616
Reputation: 61,653

Post » Tue Feb 23, 2016 12:13 am

Ah, I forgot I was trying a second sprite and trimmed it down to one. It's been a few days since I worked on it. Doh! lol. Anyway, that works brilliantly! Thanks much for the suggestions.
B
6
Posts: 30
Reputation: 310


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 42 guests