Need Help making a toggle button for rapid fire.

So ive got a global attribute called rapid fire that the player actor responds to accordingly but i need to set up a toggle so that the player can turn it off and on. help would be apreciated :) i tried making one but it failed horribly.

Comments

  • BBEnkBBEnk Member Posts: 1,764

    make your toggle a integer

    then a rule when touch is pressed

    change attribute "rapid fire" to Mod(rapid fire+1,2)

    and it will toggle 0,1

  • IVER IndustriesIVER Industries Member Posts: 29

    @BBEnk‌ that went way over my head man, if its a toggle wouldnt it make sense to be a boolean?

  • BBEnkBBEnk Member Posts: 1,764

    it want work with a boolean don't ask me why I don't know but it works.

  • Tiny_IdeasTiny_Ideas Member Posts: 326

    Hi,

    Here is a demo attached - Very simple using a game.attribute (integer).

    • Jeromy
Sign In or Register to comment.