Only certain turrets fire in my PvZ style TD game?

0 favourites
  • 7 posts
From the Asset Store
10 turrets rendered in 3D with top down and menu views. Three upgrade levels per tower.
  • Recently, I started to make a game along the lines of how Plants vs Zombies is played. A tower defense game that takes place in rows. I've gotten a lot of the things I needed set up, but I'm encountering this random bug, that really makes the game impossible to play properly.

    Whenever a turret fires, it somehow prevents other turrets from firing. I've tried making the bullets and the turrets as personal together as possible. But nothing seems to work. I don't quite understand what triggers it, because it only happens sometimes. I need help fixing this, anyone have any idea?

  • Hi Evanetot,

    Overall I think we need a bit more information about your project. Can you post your .caproj file, or if you aren't comfortable sharing your project perhaps make a "mockup" of the issue with placeholders in a new file?

    It sounds to me like your Triggers are not individualising your turrets, i.e., when a Turret sees an enemy it is only picking the first instance with which to check Conditions and perform Actions.

  • Lncredible mediafire.com I'm not the most professional user of C2, so my means of using event sheets may seem messy and weird.

  • 99Instances2Go thank you so much; your name is going to show up in the credits for sure. Without you, the whole game would have failed.

    (edit) The original problem still persists, random instances of the turret will not fire if another one is firing too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You are right. I am sorry, it was getting late.

    https://www.dropbox.com/s/xpclhhmnmhksz ... .capx?dl=0

    Solution is this. I duplicated frame 2. Now when it is frame 2 & shooting, then advance to frame 3. Since there are several shooting, a 'for each' is needed. Now it is on frame 2 for only 1 tick. This means that frame 2 + 3 is one tick longer onscreen than the other frames. But, for such a slow frames/second, none can see that.

    At the moment there are dots in the shooting animation. Easyer to debug. Had to see if they shoot and also stop shooting when no enemy in sight. You can remove those easy when ready.

    Also, did you notice the other things ? LIke how easy it is to use a tilemap for grid snapping. LIke how easy it is to use spawners ? Like, every thing has now a row number, for in case you need it. Like how animations are (on there end) easyer and better then wait/timers to time die events. Did you notice the picking ? Did you notice the 'placer' and the easy flow of using it ? Did you notice the 'else' where needed ?

  • 99Instances2Go yes I did notice all that amazing stuff, I'm just used to messy project files. Thank you.

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