Setting Sprites Invisible To Stop Actions

Get help using Construct 2

Post » Sun May 22, 2016 2:27 am

Hey.

I'm creating a single player boat shooter game and you unlock new turrets on your ship my gaining more points. Currently, all but one turret are invisible, but whenever you shoot, all the turrets shoot, even the invisible turrets. Is there anyway to ignore shooting command while set invisible?

Cheers
B
10
S
3
Posts: 8
Reputation: 658

Post » Sun May 22, 2016 3:14 am

You will need to use the enable turret / disable turret actions.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
65
S
17
G
8
Posts: 636
Reputation: 9,333

Post » Sun May 22, 2016 5:29 am

chrisinfinger wrote:You will need to use the enable turret / disable turret actions.

I mean the turrets don't have the turret behavior, I just call them turrets. They're just sprites which shoots bullets at a image point.
Any other ideas?
B
10
S
3
Posts: 8
Reputation: 658

Post » Sun May 22, 2016 8:18 am

On every tick, you could add a sub-event by pressing b, then c for a condition, select your turret object, type in "is visible", select it, and put your shooting events there.
B
15
S
7
G
34
Posts: 55
Reputation: 18,478

Post » Sun May 22, 2016 7:36 pm

The key with Construct2 instance selection is "picking" (read about it in manual, its essential). Basically you need to make sure you are picking the instance you want to be doing something, otherwise it picks all instances of the type specified. You pick instances using conditions in your events. In Bloodshot's example you are picking the "visible" sprite to act on. You can pick using basically anything that singles out a specific object... closest, furthest, visible, X-visible, on-screen, X-on-screen, UID, instance variables, etc. to name just a few.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
65
S
17
G
8
Posts: 636
Reputation: 9,333

Post » Sun May 22, 2016 8:02 pm

Yar as above, 'turret is visible' condition on the shooting event.
B
45
S
15
G
73
Posts: 2,021
Reputation: 43,424


Return to How do I....?

Who is online

Users browsing this forum: sublimate and 2 guests