Drag sprite & if released, bullet slowly down to start pos

Get help using Construct 2

Post » Fri Sep 08, 2017 5:21 pm

Hi Scirra community,

I'm trying to create a behavior were if mouse drags sprite (up or down), then the sprite moves with the mouse, but if released, it slowly moves back to starting position.
drag up
drag up
---start centre ---
drag down
drag down

I've tried a few things but doesn't quite work. Any ideas would be most appreciated.
Thanks,
Roberto
B
4
S
1
Posts: 47
Reputation: 471

Post » Fri Sep 08, 2017 5:26 pm

I'm interested to know what you tried because it seems quite simple and I'm not sure which method could go wrong! You can say, when not being dragged, move the sprite every tick a number of pixels forward, and set the angle of the object to 90 if it's above the Y of start co-ords and set angle to 270 if it's below the start position.
B
46
S
16
G
74
Posts: 2,088
Reputation: 44,185

Post » Fri Sep 08, 2017 8:58 pm

Muchos Gracias plinkie,
You helped me visual and rethink. I have now achieved what I set out to do!!!

Once again, Thank you!
B
4
S
1
Posts: 47
Reputation: 471


Return to How do I....?

Who is online

Users browsing this forum: blue visionary, mihirolover, namaewayukidesu and 16 guests