Fire button with multiple functions question?
I can't get my head around this problem,, perhaps the solution is easy..
I have a fire button in my game, when touched my hero shoots zap1.. (when touch is pressed game.zap is true when touch is released game.zap is false).. this works fine to make my hero shoot.
But I want that same button to fire a larger zap2. By holding down the fire button for maybe 2 seconds and only fire when releasing, I also want to animate the build up of this zap before it is released,,, this way the player can fly around with a built up zap2, waiting to fire it..
I have tried a few things with timers, etc.. but nothing has worked so far..
Many thanks,
TN
I have a fire button in my game, when touched my hero shoots zap1.. (when touch is pressed game.zap is true when touch is released game.zap is false).. this works fine to make my hero shoot.
But I want that same button to fire a larger zap2. By holding down the fire button for maybe 2 seconds and only fire when releasing, I also want to animate the build up of this zap before it is released,,, this way the player can fly around with a built up zap2, waiting to fire it..
I have tried a few things with timers, etc.. but nothing has worked so far..
Many thanks,
TN