0 Favourites

Problems with Instances

  • 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:

    Download:

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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).

  • AwesomePuppy if you want to learn about INSTANCE VARIABLE take look at this tutorial link below

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)