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 

Help - Driver: Parallel Lines

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Scripts
View previous topic :: View next topic  
Author Message
jvpmj



Joined: 30 Jul 2007
Posts: 3
Location: Portugal

Digg It
PostPosted: Mon Jul 30, 2007 12:29 am    Post subject: Help - Driver: Parallel Lines

Hi.
I tried to use a steering wheel script that came with glovepie. I configure everything like it is said in glovepie and ppjoy but when gaming nothing happens. But the problem I think is with ppjoy. Because in the option to select the type of controller I can only see - mouse/keyboard and bluetooth HID keyboard. It should appear a joystick right?
Any ideas?
Back to top
View user's profile Send private message
ddddddddd



Joined: 11 Jul 2007
Posts: 13

Digg It
PostPosted: Mon Jul 30, 2007 3:37 am    Post subject:

Here are 2 both are wiimote only use as a steering wheel.
Code:

/****************************************************
Colin McRea Script
 By ddd

Thanks to
 almostconnected (almost"technodookie"com)
****************************************************/

// init
if not Var.Init
   Var.Init     = true;
   Var.MinAng   = 9  degrees;
   Var.MaxAng   = 60 degrees;
   Var.DeadZone = Var.MinAng / Var.MaxAng;
   Var.LiveZone = 1.0 - Var.DeadZone;
end

// update max angle
if Pressed (Key.LeftBracket)
   Var.MaxAng = Var.MaxAng - 10;
end
if Pressed (Key.RightBracket)
   Var.MaxAng = Var.MaxAng + 10;
end
debug = "Max Angle = " + Var.MaxAng;

// normalize input
Var.JoyX = EnsureRange( Wiimote.SmoothPitch / Var.MaxAng, -1, 1 );

// apply deadzone for X axis
if Abs(Var.JoyX) > Var.DeadZone

   if Var.JoyX > 0
      Var.JoyX = Var.JoyX - Var.DeadZone;
   else
      Var.JoyX = Var.JoyX + Var.DeadZone;
   end
   Var.JoyX = Var.JoyX / Var.LiveZone;

else
    Var.JoyX = 0.0;
end

// pulse X axis
Var.TimerX = Var.TimerX + 1.0; // time since the last pulse (in frames)
Var.PulseX = 1.0 / Abs(Var.JoyX); // pulse rate (frames per pulse, infinity is okay!)

if Var.TimerX >= Var.PulseX // pulse!
    Key.Left   = Var.JoyX < 0;
    Key.Right  = Var.JoyX > 0;
    Var.TimerX = Var.TimerX mod Var.PulseX; // update time since the last pulse
else
    Key.Left   = false;
    Key.Right  = false;
end

// Buttons
Key.Space      = Wiimote.A;           //HandBrake
Key.Enter      = Wiimote.B;           //enter
Key.F1          = Wiimote.Plus;        //change view
Key.Escape     = Wiimote.Home;        //escape
Key.End        = Wiimote.Minus;       //reset car
Key.Down       = Wiimote.One;         // Press 1 = brake
Key.Up         = Wiimote.Two;         // Press 2 = accel

// D-Pad 
Key.Up    = Wiimote.Right
Key.Down  = Wiimote.Left
Key.Left  = Wiimote.Up
Key.Right = Wiimote.Down

// debug (Rumble left and right lock)
Wiimote.rumble = 25 * (Key.Left or Key.Right);



Code:

/****************************************************
V8 Super Cars Script
 By ddd

Thanks to
 almostconnected (almost"technodookie"com)
****************************************************/

// init
if not Var.Init
   Var.Init     = true;
   Var.MinAng   = 9  degrees;
   Var.MaxAng   = 60 degrees;
   Var.DeadZone = Var.MinAng / Var.MaxAng;
   Var.LiveZone = 1.0 - Var.DeadZone;
end

// update max angle
if Pressed (Key.LeftBracket)
   Var.MaxAng = Var.MaxAng - 10;
end
if Pressed (Key.RightBracket)
   Var.MaxAng = Var.MaxAng + 10;
end
debug = "Max Angle = " + Var.MaxAng;

// normalize input
Var.JoyX = EnsureRange( Wiimote.SmoothPitch / Var.MaxAng, -1, 1 );

// apply deadzone for X axis
if Abs(Var.JoyX) > Var.DeadZone

   if Var.JoyX > 0
      Var.JoyX = Var.JoyX - Var.DeadZone;
   else
      Var.JoyX = Var.JoyX + Var.DeadZone;
   end
   Var.JoyX = Var.JoyX / Var.LiveZone;

else
    Var.JoyX = 0.0;
end

// pulse X axis
Var.TimerX = Var.TimerX + 1.0; // time since the last pulse (in frames)
Var.PulseX = 1.0 / Abs(Var.JoyX); // pulse rate (frames per pulse, infinity is okay!)

if Var.TimerX >= Var.PulseX // pulse!
    Key.Left   = Var.JoyX < 0;
    Key.Right  = Var.JoyX > 0;
    Var.TimerX = Var.TimerX mod Var.PulseX; // update time since the last pulse
else
    Key.Left   = false;
    Key.Right  = false;
end

// Buttons
Key.Space      = Wiimote.A;           //HandBrake
Key.Enter      = Wiimote.B;           //enter
Key.C          = Wiimote.Plus;        //change view
Key.Escape     = Wiimote.Home;        //escape
Key.End        = Wiimote.Minus;       //reset car
Key.Down       = Wiimote.One;         // Press 1 = brake
Key.Up         = Wiimote.Two;         // Press 2 = accel

// D-Pad 
Key.Up    = Wiimote.Right
Key.Down  = Wiimote.Left
Key.Left  = Wiimote.Up
Key.Right = Wiimote.Down

// debug (Rumble left and right lock)
Wiimote.rumble = 25 * (Key.Left or Key.Right);




Last edited by ddddddddd on Sat Aug 11, 2007 3:51 pm; edited 2 times in total
Back to top
View user's profile Send private message
jvpmj



Joined: 30 Jul 2007
Posts: 3
Location: Portugal

Digg It
PostPosted: Mon Jul 30, 2007 11:15 am    Post subject:

Thanks. But I tried both and I can only steer for example in windows, when the text pointer goes left and right, but in the game nothing happens Rolling Eyes
Back to top
View user's profile Send private message
jvpmj



Joined: 30 Jul 2007
Posts: 3
Location: Portugal

Digg It
PostPosted: Mon Jul 30, 2007 11:25 am    Post subject:

Problem solved. I just had to set the digital right and left with the wiimote. Thanks!
Back to top
View user's profile Send private message
Nirkon



Joined: 10 Jun 2008
Posts: 10

Digg It
PostPosted: Tue Jun 10, 2008 8:48 pm    Post subject:

gonna test these out tomorrow with "Dirt"

thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Scripts 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