Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-31-2009, 01:56 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Simple Multi-Touch Demo

I know this won't mean much right now since there's only a couple developers who can actually see/use it, but this is basically how it's working right now.

The current limitation on this script is that you can only drag one light at a time. So for instance if you move two fingers around only one of the lights will move.

PHP Code:
/*
   Simple Multi-Touch Demo
*/

//#CLIENTSIDE

function GraalControl.onMouseDown(keymodmxmyclicksmouse) {
  
with (findimg(200 mouse)) {
    
mx 64;
    
my 64;
    
image "light2.png";
    
alpha 0.99;
    
zoom  1.4;
    
layer 4;
    
//I had a mod equation here, but the forums didn't like it.
    //temp.lightcolor = mouse [percent] 4;
    
temp.lightcolor mouse;
    switch (
temp.lightcolor) {
      case 
0red 1blue green 0; break;
      case 
1blue 1green red 0; break;
      case 
2green 1blue red 0; break;
      case 
3red green 1blue 0; break;
    }
  } 
}

function 
GraalControl.onMouseDragged(keymodmxmyclicksmouse) {
  
with (findimg(200 mouse)) {
    
mx 64;
    
my 64;
  } 
}

function 
GraalControl.onMouseUp(keymodmxmyclicksmouse) {
  
hideimg(200 mouse);

Anyway here's an image just to show what happens when you're touching it with four different fingers.

__________________
Quote:
Reply With Quote
  #2  
Old 12-31-2009, 02:07 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Thanks for posting this, this is v. interesting
Reply With Quote
  #3  
Old 12-31-2009, 03:36 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Technically speaking, you don't just need an iPhone/iPod to use multi-touch. Macbooks have had em for awhile (ew) and now Windows 7 supports it so I imagine there are some PCs that have it out there as well, so this is a good time for this kind of thing to be understood.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #4  
Old 12-31-2009, 04:31 AM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
Quote:
Originally Posted by coreys View Post
Technically speaking, you don't just need an iPhone/iPod to use multi-touch. Macbooks have had em for awhile (ew) and now Windows 7 supports it so I imagine there are some PCs that have it out there as well, so this is a good time for this kind of thing to be understood.
The client probably doesn't have an interface to communicate with the Windows 7 or Macbook support.
Reply With Quote
  #5  
Old 07-28-2010, 05:23 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Thanks for posting this. May turn out to be pretty helpful to me.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #6  
Old 07-28-2010, 05:28 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by coreys View Post
Technically speaking, you don't just need an iPhone/iPod to use multi-touch. Macbooks have had em for awhile (ew) and now Windows 7 supports it so I imagine there are some PCs that have it out there as well, so this is a good time for this kind of thing to be understood.
MacBooks have multi-touch trackpad support. In other words, you can't have two "mice" like you can on an iPhone. The only use for multi-touch on a MacBook right now is gestures (and they work quite well).
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.