Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


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 03:12 AM.


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