How do I make an game object to move left and right smoothly

Get help using Construct 2

Post » Mon Mar 09, 2015 3:55 am

Hi,

I am very excited to start with Construct 2 for game development.

I`ve been developing a game where I will have a box at the bottom which has an emitter which emits bullets (looks like a turrett )and I want to move that emitter to left and right of the layout based on the mouse position .

If I move the mouse lower to the layout(bottomleft or bottomright) the emitter was turning to the bottom of the layout and emits the bullets,How can I avoid moving this to the bottom and emits bullets,something like it should always operate between 45 degrees and 135 degrees.

It should not move more than that and it should turn smoothly between those angles,if I added a keyboard left arrow its moving to left and right arrow to right,but its moving very fast,can we make that moving slowly.
B
2
Posts: 1
Reputation: 152

Post » Mon Mar 09, 2015 8:41 am

first, as you are a beginner, must know that angle in construct 2 is counter clockwise, so 45-135 actually means down, you are aiming to -45, -135 .

mouse solution: https://www.youtube.com/watch?v=wO6aPXhUm-s min 8:35 to limit the aiming.
https://www.youtube.com/watch?v=IB7CygEoMcA min 4:55 for the actual aiming
Image
B
53
S
13
G
6
Posts: 271
Reputation: 11,963


Return to How do I....?

Who is online

Users browsing this forum: Cryttexx, KNTMartin, ridhoemgl, Unconnected and 7 guests