Only certain turrets fire in my PvZ style TD game?

Get help using Construct 2

Post » Thu Sep 22, 2016 1:12 am

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?
Oh, okay.
B
23
S
5
Posts: 39
Reputation: 1,251

Post » Thu Sep 22, 2016 8:28 am

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.
B
8
S
2
Posts: 59
Reputation: 686

Post » Thu Sep 22, 2016 8:44 pm

Message: Evanetot can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
@Lncredible https://www.mediafire.com/?da7ql1jz4h2o7ki I'm not the most professional user of C2, so my means of using event sheets may seem messy and weird.
Last edited by Evanetot on Sat Sep 24, 2016 12:23 am, edited 1 time in total.
Oh, okay.
B
23
S
5
Posts: 39
Reputation: 1,251

Post » Fri Sep 23, 2016 11:15 pm

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat Sep 24, 2016 12:17 am

@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.
Oh, okay.
B
23
S
5
Posts: 39
Reputation: 1,251

Post » Sat Sep 24, 2016 11:00 am

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 ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat Sep 24, 2016 4:08 pm

@99Instances2Go yes I did notice all that amazing stuff, I'm just used to messy project files. Thank you.
Oh, okay.
B
23
S
5
Posts: 39
Reputation: 1,251


Return to How do I....?

Who is online

Users browsing this forum: atmas, Baidu [Spider], David181, OBLIVION and 22 guests