How do I add an auto-move gun?

Get help using Construct 2

Post » Sat Sep 10, 2016 12:04 pm

Message: gajina can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I'm creating a simple birds shooting game and I'd like to add a gun like in this game:
https://www.scirra.com/arcade/shooting- ... newcomment
Can anybody help me? thanks
B
4
Posts: 10
Reputation: 224

Post » Sat Sep 10, 2016 4:50 pm

Please post the game URL again without https://www. The URL got cut off. :(
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Sun Sep 11, 2016 12:10 pm

Gmoney wrote:Please post the game URL again without https://www. The URL got cut off. :(


scirra.com/arcade/shooting-games/shooting-gallery-8800?comments=1#newcomment
B
4
Posts: 10
Reputation: 224

Post » Mon Sep 12, 2016 2:25 am

Just make it always set X and Y position of the gun to the X and Y of the mouse, as long as the cursor is within the central area.

E.g. you can do something like,
X of Mouse is between 5 and 200 -> Set X of Gun to X of Mouse

This makes the gun follow the mouse as long as the position of the cursor is within the area between 5 and 200. Similar thing for the Y value.
B
50
S
23
G
17
Posts: 291
Reputation: 12,432

Post » Mon Sep 12, 2016 9:07 pm

gajina wrote:
Gmoney wrote:Please post the game URL again without https://www. The URL got cut off. :(


scirra.com/arcade/shooting-games/shooting-gallery-8800?comments=1#newcomment


Take a look at this example. :mrgreen:

https://www.dropbox.com/s/026r9orfs9sqw ... .capx?dl=0
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Thu Sep 15, 2016 6:12 pm

thanks guys!
B
4
Posts: 10
Reputation: 224


Return to How do I....?

Who is online

Users browsing this forum: bilgekaan and 8 guests