I have a HUGE problem in making a clicker game.

Hey whats up! Thank you for coming to read this post. As you already have read I have a huge problem in making a clicker game. This is what the game looks like: 

The clicking object is the one in the middle. Down there are the objects that you can buy. Etc if you buy one “thing”, let’s say thing2 you will get 2 currency per second without clicking . So without clicking in 10 seconds you will earn a total of 20 currency. Also the cost of the thing will raise.

So this is an example:

thing1 gives you 1 per sec without clicking and cost 10 currency

thing2 gives you 2 per sec without clicking and cost 50 currency

thing3 gives you 5 per sec without clicking and cost 300 currency

thing4 gives you 10 per sec without clicking and cost 750 currency

This is my problem.

Sometimes when I click to purchase let’s say thing 4, it will purchase thing2 or thing3, and I have to re-click the thing 4 to purchase and it may or may not purchase it. Even when I have coded it so that it should purchase the thing4. Also etc. when I press thing10 it will purchase thing(something). 

I have tried to debug it for a long time and even the google wont give me answers. Also I can not give the source code. So do anyone of you have any answers?

Anyways thank you for your time even if you can not help me.

could you please post code

I can not. Sorry.

how can we debug then?

If you have any ideas.

Are you using 
 

Runtime:addEventListener("touch", touchScreen)

Instead of each one individually like:
 

thing1:addEventListener("touch", touchOption1) thing2:addEventListener("touch", touchOption2) thing3:addEventListener("touch", touchOption3)

My last guess would be that somehow the dimensions of the pictures override or are on top of the other ones, therefore you can’t properly touch a single picture.

Yes I am using. Also I just have spot another thing. it is that however, whenever I am going to buy any of the things it will buy the thing3 as the first one and I have to re-click and it will buy the thing I wanted to buy in the first place.

Clarify, which event listener method are you using?

I am using:

thingX:addEventListener(“touch”, thingXBought)

The only thing i can think of are the dimensions of the pictures being used. They might overlap the other picture they are next to.

Okay thanks. Any idea how I could check and debug that

The easiest way for me to tell if pictures were overlapping each other, was to give the pictures a body:

physics.addBody(thing1, "static", {density=.1, bounce=0.1, friction=.2})

then using this at the top of my program:

physics.setDrawMode( 'debug' )

 

Ok thanks. I will notify how it worked.

Ok. I have a problem. When I tried to debug as you said, I found out that the dimensions of the pics are all on top of each other even though, their x’s and y’s are not the same. Btw I am using scroll view to scroll the items. Any ideas?

Never mind I am going to re program the whole game.

You can set their dimensions with thing1.width = 30 and thing1.height = 80 to ensure they don’t stray off.

Lets all take a second to understand that trying to get debug assistance without seeing the code being debugged is not an efficient process. The amount and quality of input decreased by a factor of 10 as soon as you said that you couldn’t provide your source.

This isn’t meant to chastise but to educate. If you really have an NDA but still need help, break the issue down to its bare bones and then post the issue. This will help both community members to provide accurate info, and help you to get to the root of the problem.

^^ What that crazy guy said.

There is no reason to not post at least isolated code up. It’s certainly more respectful for the people trying to help.

With some code it’s more than likely that your issue will be solved very quickly.

Good luck.

Ok.
@Rob Miracle you can lock this post.

could you please post code