How do I fix this glitch?

Get help using Construct 2

Post » Fri Oct 10, 2014 7:40 pm

Message: SwaggyMcChicken is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
I'm making a project for school, and for the boss, he's going to (every second) choose whether he wants to shoot to the left, shoot to the right, or walk to the left or right. To error is, when he chooses to shoot he spawns a ton of them. Does anyone know how to fix this error? The game is the MediaFire link below, it's under the "Enemies - Boss" group in my event sheet. ( I couldn't upload a file larger than 2 MB as an attachment, the file is 2.94MB :L )
B
4
Posts: 14
Reputation: 228

Post » Fri Oct 10, 2014 7:54 pm

Nevermind, Scirra won't let me post URL's... o-o
B
4
Posts: 14
Reputation: 228

Post » Fri Oct 10, 2014 8:52 pm

Add an instance variable to your boss named 'canFire' or something, check this is true when going to spawn a bullet, and when he does spawn a bullet set this to false so he wont spawn another straight away.

Then after the bullet is destroyed set the bosses 'canFire' variable back to true, not sure if this would do what you wanted.

Other way you could set the variable back to 'true' every 1 second or something.

Hope this helps
B
11
S
2
G
1
Posts: 68
Reputation: 777


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, DolyGamesCosmos, totoe and 24 guests