limit ballistic count

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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 <img src="smileys/smiley1.gif" border="0" align="middle" />

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

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

    Thanks

  • 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

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