This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Agent Silence's profile picture

Someone please take over my work!

Started by Agent Silence, 17 October 2014 - 04:59 PM
Agent Silence #1
Posted 17 October 2014 - 06:59 PM
I *attempted* to make a "Don't tap the white tiles" using Iron Noteblocks. First off
1. Click detection is wrong, I don't know why
2. No set songs

It uses a 2x3 monitor, and pretty messy code. I want someone to take it over because I have decided i'm not the best person for the job. So if someone could finish this project I would be very happy.

Pastebin : FrWTCwW1
Dragon53535 #2
Posted 17 October 2014 - 09:53 PM
One of the more glaring things i can see in your touch detection, is if for some reason the monitor returns a floating point for the xpos you might get it inside the wrong area. Such as if x < 10 well then 9.5 would be in that, but it would be in the if x > 9 one as well, which while they're else if's it would go for the first, however you might want it to be in the second.
valithor #3
Posted 17 October 2014 - 09:55 PM
It should be noted that monitor click event is slightly off. It does not return EXACTLY where you actually clicked, but it is close. If the game was not on a monitor you would not have this problem.
Lyqyd #4
Posted 17 October 2014 - 10:14 PM
Monitor clicks do return exactly where you clicked, any other behavior is a bug and should be reported with reproduction instructions. Monitor clicks do not return non-integer coordinates.
valithor #5
Posted 17 October 2014 - 10:17 PM
Last i checked they were slightly off this might be in a older version, but anytime I ever used a program that used monitor clicks it always thought i clicked slightly to the left of where I actually did.


Edit:
Thinking back upon this though it may have just been because of faulty code in the programs.
Edited on 17 October 2014 - 08:20 PM
MKlegoman357 #6
Posted 18 October 2014 - 08:47 PM
It's an old bug which probably hasn't been fixed yet.
Edited on 18 October 2014 - 06:47 PM
valithor #7
Posted 18 October 2014 - 09:40 PM
It's an old bug which probably hasn't been fixed yet.

Thank you didn't think I was imagining it.