Problems with Instances

Just started using Construct 2? Post your questions here

Post » Sun Aug 21, 2016 3:01 am

Message: AwesomePuppy can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
So, I'm trying to make a ship based game, and I have hit a roadblock. Every time I destroy an enemy ship, the ship and its turrets blow up. But the thing is, when a single ship gets destroyed, all turrets on the map get destroyed. Also, how do i add in a reload system for the player's ship's guns. Any suggestions?

You can play here: http://localhost:50000/
Posts: 6
Reputation: 187

Post » Sun Aug 21, 2016 3:58 am

You need conditions to pick the turrets that blow up. In your conditions, you probably already reference the ship, so the game knows which ship to destroy. If you add an action to destroy turret without picking any, it is assumed that that action will be applied to all turrets.

Try adding the condition turret is overlapping ship.

Utilizing containers is a good way to work around this as well.

There are many many ways to implement reloading, so without any further detail on the specific behavior you want I'm going to just suggest you run a quick search. Generally it involves a counter variable to keep track of ammo remaining and some events to handle what happens in different "states" (ammo full, partially empty, empty).
Mistakes were made.
Posts: 1,942
Reputation: 74,861

Post » Sun Aug 21, 2016 2:24 pm

AwesomePuppy if you want to learn about INSTANCE VARIABLE take look at this tutorial link below
Posts: 2,039
Reputation: 43,944

Return to Beginner's Questions

Who is online

Users browsing this forum: Huyax and 0 guests