WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Virtua Tennis 3 Script Request.

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
View previous topic :: View next topic  
Author Message
ZaK



Joined: 25 Jul 2007
Posts: 2

Digg It
PostPosted: Wed Jul 25, 2007 7:48 pm    Post subject: Virtua Tennis 3 Script Request.

Hi all,

I need a GlovePIE Scripts for play Virtua Tennis 3 with my wiimote.

someone can help me?
thanks.
Back to top
View user's profile Send private message
ravaillac



Joined: 31 Mar 2007
Posts: 7

Digg It
PostPosted: Sun Jul 29, 2007 11:14 am    Post subject:

This is mine.
I hope you like it.

Code:

// #################################################
//                Virtua Tenis 3
//               Ravaillac script
// #################################################
//
// I started from Ethan's script and i modified it
//
// #################################################
// Game controls (to change) 
//      Z : Lift
//       X : Slice
//       C : Lob
// Wiimote controls
//       Pad : direction keys
//       One : Escape
//      Two : change view (Key V)
// #################################################

PIE.FrameRate = 40
var.xCutoff = 33
var.zCutoff = 25

// Initialisation du compteur
var.now=abs(ceil( now * 1000000))

// ExitScript
if(doubleclicked(Wiimote.Home))  then
   say("Stop script execution")
   wait 2 s
   ExitScript
endif

// Auto Calibration
if (var.calibration = false) then
   var.offsetX = -1
   var.offsetY = 26
   var.offsetZ = 2
endif

if(doubleclicked(Wiimote.2))  then
   say("Calibration realized")
   var.offsetX = Wiimote.RawForceX
   var.offsety = Wiimote.RawForceY
   var.offsetZ = Wiimote.RawForceZ
   var.calibration = true
endif


// In menu
Enter = Wiimote.A
Up = Wiimote.Up
Down = Wiimote.Down
Left = Wiimote.Left
Right = Wiimote.Right

Escape = Wiimote.One
Key.V = Wiimote.Two

var.RelAccX = smooth (Wiimote.RelAccX,1)
var.RelAccY = smooth (Wiimote.RelAccY,1)
var.RelAccZ = smooth (Wiimote.RelAccZ,1)

var.xRot = Wiimote.RawForceX - var.offsetX
var.yRot = Wiimote.RawForceY - var.offsetY
var.zRot = Wiimote.RawForceZ - var.offsetZ


// Choix de la direction
if var.xRot > var.xCutoff then
   var.onUp = true
endif

if var.xRot < -var.xCutoff then
   var.onDown = true
endif

if var.zRot > var.zCutoff then
   var.onLeft = true
endif

if var.zRot < -var.zCutoff then
   var.onRight = true
endif

var.deltaNow = 5

// Control Movement
   if ((var.now > (var.oldNow + var.deltaNow)) and var.RelAccY >= 15 and var.RelAccX < 0  ) then      //  Lift  WWWWWW
      if (var.OnLeft=1 and var.OnRight=0) then
         Z = true
         Wiimote.Rumble = True
         Wait 100 ms
         Left = true
         Wait 100 ms
         Left = false
         Wait 100 ms
         Z = false
         Wiimote.Rumble = False
         var.oldNow = var.now

      elseif (var.OnLeft=0 and var.OnRight=1) then
         Z = true
         Wiimote.Rumble = True
         Wait 100 ms
         Right = true
         Wait 100 ms
         Right = false
         Wait 100 ms
          Z = false
         Wiimote.Rumble = False
         var.oldNow = var.now
      elseif (var.OnLeft=0 and var.OnRight=0)
         Z = true
         Wiimote.Rumble = True
         Wait 200 ms
         Z = false
         Wiimote.Rumble = False
         var.oldNow = var.now
      endif

    
   elseif ((var.now > (var.oldNow + var.deltaNow)) and var.RelAccX >= 20 and var.RelAccY < 15) then    //  Slice     XXXXX
      if (var.OnLeft=1 and var.OnRight=0) then
         X  = true
         Wiimote.Rumble = True
         Wait 100 ms
         Left = true
         Wait 100 ms
         Left = false
         Wait 100 ms
         X = false
         Wiimote.Rumble = False
         var.oldNow = var.now
      elseif (var.OnLeft=0 and var.OnRight=1) then
         X = true
         Wiimote.Rumble = True
         Wait 100 ms
         Right = true
         Wait 100 ms 
         Right = false
         Wait 100 ms
         X = false
         Wiimote.Rumble = False
         var.oldNow = var.now
      elseif (var.OnLeft=0 and var.OnRight=0) then
         X = true
         Wiimote.Rumble = True
         Wait 200 ms
         X = false
         Wiimote.Rumble = False
      endif
   
   //endif
   
   elseif ( (var.now > (var.oldNow + var.deltaNow)) and var.RelAccX >= 10 and var.RelAccY >= 30) then   //  Lob   CCCCc
      if (var.OnLeft=1 and var.OnRight=0) then
         C = true
         Wiimote.Rumble = True
         Wait 100 ms
         Left = true 
         Wait 100 ms
         Left = false
         Wait 100 ms
         C = false
         Wiimote.Rumble= False
       var.oldNow = var.now
   elseif (var.OnLeft=0 and var.OnRight=1) then
        C = true
        Wiimote.Rumble = True
        Wait 100 ms
        Right = true
        Wait 100 ms 
        Right = false
        Wait 100 ms
        C = false
        Wiimote.Rumble = False
      var.oldNow = var.now
      elseif (var.OnLeft=0 and var.OnRight=0) then
         C = true
         Wiimote.Rumble = True
         Wait 300 ms
         C = false
         Wiimote.Rumble = False
      endif
   endif




var.right = right
var.left = left
var.up = up
var.down = down
var.W = W
var.X = X

up = false
down =false
Right = False
Left = False
var.OnLeft=0
var.OnRight=0


var.OnLeft = 0
var.OnRight = 0

debug =var.finalx + " " + var.finaly
Back to top
View user's profile Send private message
ZaK



Joined: 25 Jul 2007
Posts: 2

Digg It
PostPosted: Sun Jul 29, 2007 10:31 pm    Post subject:

Thanks.
Back to top
View user's profile Send private message
jeromote



Joined: 19 Mar 2008
Posts: 66

Digg It
PostPosted: Sat Mar 22, 2008 5:58 am    Post subject:

thank for your script ravaillac,
But I find it really long (I like the short and simple script), but thanks anyway.
Thanks to you I have a script to vt3 with 4 wiimotes, which I will post on my site, for those interested wiidows.fr .
Regrettable not to post here I prefer to put all my creations on the site.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
CarlKenner
Site Admin


Joined: 29 Nov 2006
Posts: 614

Digg It
PostPosted: Sat Apr 19, 2008 12:18 am    Post subject:

Cool site!
Back to top
View user's profile Send private message Send e-mail
jeromote



Joined: 19 Mar 2008
Posts: 66

Digg It
PostPosted: Sat May 17, 2008 9:18 pm    Post subject:

CarlKenner wrote:
Cool site!

thank you, at you for your software,
which is great for programming the wiimote
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Nirkon



Joined: 10 Jun 2008
Posts: 10

Digg It
PostPosted: Tue Jun 10, 2008 6:11 pm    Post subject:

thanks! im actually installing this now just to see this Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group