limit ballistic count

Get help using Construct 2

Post » Tue Jul 30, 2013 2:20 pm


image


I want to limit the ballistics count on screen so I added a
counter which is checked upon pressing 'NUM1'(which is the
fire button). However upon adding this the event does not
trigger at all, if I remove the 'NUM1' if works fine and cant
figure out why

Any help would be appreciatedLI0NHART2013-07-30 14:22:05
B
14
S
6
G
3
Posts: 83
Reputation: 4,218

Post » Tue Jul 30, 2013 2:24 pm

@LI0NHART

You want to limit the number of ballistic on screen to 1 ?

You check if ballisticCount = 0 but where do you increment this variable ?

I don't get what you are trying to do here Joskin2013-07-30 14:27:43
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Tue Jul 30, 2013 5:37 pm

Your code is way too complex for spawning these projectiles, it is pretty hard to explain how to fix it here on the post. Could you add a .capx or just the part you want to be fixed, so I could optimize it?trollface2013-07-30 17:39:12
B
14
S
5
G
4
Posts: 107
Reputation: 4,788

Post » Wed Jul 31, 2013 4:43 pm

The system tracks the amount of ballistics on screen and sets the ballisticcount variable to that amount(as circled by red). I only want 1 ballistic on screen at any 1 time. However when adding the check amount on screen condition (circled in green) it does not work at all.


Here's the image
image

Here's the capx
https://www.dropbox.com/s/ie3j1u4q12weny2/link.capx

Hope this clears it up :)

ThanksLI0NHART2013-07-31 18:06:04
B
14
S
6
G
3
Posts: 83
Reputation: 4,218

Post » Thu Aug 01, 2013 12:55 pm

I've managed to get it working. I just deleted the ballistics variable 'ballisticscount' for the object and added it as a global variable instead. Don't understand why it only works that way, maybe its a bug.

Thanks for the interest of help tho :)

PS. would interested if anyone can figure out why it wouldn't work using the object variable though
B
14
S
6
G
3
Posts: 83
Reputation: 4,218


Return to How do I....?

Who is online

Users browsing this forum: blissfulwizard, DevinMurray, newt and 16 guests