Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / getpointerstate number going wacko

Author
Message
Mychal B
13
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 29th Mar 2014 20:36 Edited at: 29th Mar 2014 20:39
Hey guys, brand new to agk, but have been programming in dbpro for a while now.

I'm trying to do a simple check to see if i can make a click on a touchscreen work, but it simply wouldn't.

When I decided to print out the value of getpointerstate() it jumps around like crazy from about 1027310000 to 1051640000 without me touching the screen.

Any idea what might be happening?

Also, I am using agk v2




Edit: Tipping the phone makes it a negative number! I'm so confused...

The fastfood zombie killer
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Mar 2014 21:34
It sounds like it's creating a pointer from the phone's accelerometers.


Have you tried getPointerPressed()?

Mychal B
13
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 29th Mar 2014 22:16
I have. Clicking gives me no difference on the value either

The fastfood zombie killer
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 29th Mar 2014 23:16
Try assigning the value to a variable and then printing the variable.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Mychal B
13
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 31st Mar 2014 00:32
Putting it in a variable gives me the same exact readings

The fastfood zombie killer
easter bunny
11
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 31st Mar 2014 00:37
Do the multitouch commands work?


do
c=GetRawTouchCount()
print(c)
sync()
loop

Mychal B
13
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 31st Mar 2014 04:20 Edited at: 31st Mar 2014 04:22
Alright! That works. I suppose I could just use that alternatively, but I'd still like to know why the other doesn't work properly...

When I add a 0 to the function it only recognizes holding the touchscreen, and a 1 acts like the getpointerstate() should

The fastfood zombie killer

Login to post a reply

Server time is: 2024-05-04 23:41:23
Your offset time is: 2024-05-04 23:41:23