views:

106

answers:

1

I'll try and be as precise as possible here!

Basically, I have an app in the AppStore which is a soundboard. It works great and we've shifted a few copies.

My client now wants to include random sounds when the character's face is clicked on TouchDown. I've got that working fine, using an array.

However, he now wants the button to return, let's say, 10 sounds BEFORE playing random sounds from another batch of 10.

So, in theory, you'd have to hit the button at least 10 times to hear the other sounds.

I was trying to think of a way of counting the number of clicks, to then use a different array of sounds.

Is that even possible?

Any help would be greatly appreciated!

A: 

How about using a variable to track number of button taps?

Greg Martin
trying to rack my brains on how i'd do that. any pointers?
Simon Hume
Add an NSInteger to your class, when the IBAction occurs for the button tap, increment that count by one, and do something with that value when it hits the point you need.
Greg Martin
done it slightly differently, works great. thanks for the pointer! got a little count glitch though.
Simon Hume