can someone help with Ammo and reload please?

tollhousestudiotollhousestudio Member Posts: 166
edited November -1 in Working with GS (Mac)
I have a basic shooter set up, you press a button and the gun auto fires kinda like a machine gun would, and when you let go it stops... but I would like it to have ammo, so say like 30 bullets per clip? so when it goes empty it will auto reload which will take a few seconds or so.

Also maybe a reload button too? so you can load up when ever you need to.

Can anyone help with this?

Comments

  • tollhousestudiotollhousestudio Member Posts: 166
    Hey, how do I do the "if attribute game.ammo is greater than 0" ??

    Not sure how to do that? is that a rule?
  • tollhousestudiotollhousestudio Member Posts: 166
    Ok so I got the ammo running out after 30, made a button for reload but its not working.

    I did this:
    made a button called reload, added touch rule, then change attribute to game.Ammo+30

    But this always adds 30, so if I hit it a few times before I fire I then have 90 bullets in the clip.

    Is this the right method?
  • tollhousestudiotollhousestudio Member Posts: 166
    Hmm strange I think I tried that. I'll check again.
  • tollhousestudiotollhousestudio Member Posts: 166
    totally worked, yeah man!! thank you so much.

    you're a legend!
Sign In or Register to comment.