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 

Wii GH3 Guitar for PC LAG!!

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



Joined: 21 Jul 2008
Posts: 2

Digg It
PostPosted: Mon Jul 21, 2008 12:11 pm    Post subject: Wii GH3 Guitar for PC LAG!!

Help me please.

I used this code:

// Type your program here, or click the GUI tab to autogenerate it!

/*
// Guitar Hero PC @ Les Paul WiiGuitar HeroMode powered!!!
// Version 1.0
// Written by DerFlash based on some other Guitar Hero Scripts
// derflash[dot]de
//
// Hero Mode: Hold down "Plus" & "Minus" and kick the whammy bar (tremolo) once to enable/disable hero mode
// While in Hero Mode you wiimote rumble's every strum and also flashes the leds Wink
*/

var.found = "";
if WiiGuitar.Exists then var.found += "Guitar@Wiimote";

if var.found == "" then {
var.found = "No Guitar found - ";
}

if var.HeroMode then var.found += "@HeroMode";

var.found += (" - Battery: " + WiiMote.Battery) + "% - ";

// Debug
var.dummy = Wiimote.RawForceX
if WiiGuitar.Green then var.G = "Green" else var.G = ""
if WiiGuitar.Red then var.R = "Red" else var.R = ""
if WiiGuitar.Yellow then var.Y = "Yellow" else var.Y = ""
if WiiGuitar.Blue then var.B = "Blue" else var.B = ""
if WiiGuitar.Orange then var.O = "Orange" else var.O= ""
if WiiGuitar.Minus then var.Minus = "-" else var.Minus = ""
if WiiGuitar.Plus then var.Plus = "+" else var.Plus = ""
if WiiGuitar.StrumUp then var.Strum = "StrumUp" elseif WiiGuitar.StrumDown then var.Strum = "StrumDown" else var.Strum = ""
debug = var.found+"Frets: "+var.G+var.R+var.Y+var.B+var.O+var.Minus+var.Plus+"; Strum: "+var.Strum+"; Whammy:"+Wiimote.Classic.R+var.RF+"; Tilt=" + Wiimote.RawForceZ+"; Joystick: X = "+Wiimote.Classic.Joy1X+", Y = "+Wiimote.Classic.Joy1Y;

/*
---BUTTON MAPPING to Keyboard and Mouse--
Configuration:

Green - V
Red - C
Yellow - X
Blue - Z
Orange - Left Shift
Strum Up - Left Mouse Button
Strum Down - Right Mouse Button
Minus - Middle Mouse Button
Plus - Escape
Tilt - Middle Mouse Button
Whammy - Right Alt
Joystick Up - Up
Joystick Down - Down
Joystick Right - Right
Joystick Left - Left
*/


// Guitar Joystick
Key.Left = (-1.2 < WiiGuitar.JoyX < -0.5) // Joystick moving Left = minus X axis
Key.Right = (0.5 < WiiGuitar.JoyX < 1.2) // Joystick moving Right = positive X axis
Key.Up = (-1.2 < WiiGuitar.JoyY < -0.5) // Joystick moving Up = negative Y axis
Key.Down = (0.5 < WiiGuitar.JoyY < 1.2) // Joystick moving Down = positive Y axis


// Fret Buttons
Key.V = WiiGuitar.Green //Green
Key.C = WiiGuitar.Red //Red
Key.X = WiiGuitar.Yellow //Yellow
Key.Z = WiiGuitar.Blue //Blue
Key.LeftShift = WiiGuitar.Orange //Orange


// Plus and Minus Buttons
Mouse.MiddleButton = WiiGuitar.Minus //Star Power
Key.Escape = WiiGuitar.Plus //Menu / Pause


// Strum Bar
Mouse.LeftButton = WiiGuitar.StrumDown
Mouse.RightButton = WiiGuitar.StrumUp


Key.RightAlt = (0.6 < WiiGuitar.WhammyBar < 0.9)
//Mouse.DirectInputX = WiiGuitar.WhammyBar * 1500 // you can also use this line instead of the one above if you want to use the mouse-whammy

// Star Power
Mouse.MiddleButton = (20 < Wiimote.RawForceZ < 100)


// Turn on Players Led's
if !var.hmChange
Wiimote1.Leds = 1;
Wiimote2.Leds = 2;
Wiimote3.Leds = 4;
Wiimote4.Leds = 8;
endif


//////////// HEROMODE ///////////////


if !var.hmChange // get rid of the on-off-stuttering
// deactivating HeroMode
if var.HeroMode then
if WiiGuitar.Plus && WiiGuitar.Minus && (0.6 < WiiGuitar.WhammyBar < 0.9)
var.hmChange = true;
var.HeroMode = false;
wiimote.Leds = 15
wait 100 ms
wiimote.Leds = 7
wait 100 ms
wiimote.Leds = 3
wait 100 ms
wiimote.Leds = 1
wait 1000 ms;
var.hmChange = false;
endif
// activating HeroMode
else
if WiiGuitar.Plus && WiiGuitar.Minus && (0.6 < WiiGuitar.WhammyBar < 0.9)
var.hmChange = true;
var.HeroMode = true;
wiimote.Leds = 1
wait 0 ms
wiimote.Leds = 3
wait 0 ms
wiimote.Leds = 7
wait 0 ms
wiimote.Leds = 15
wait 0 ms;
wiimote.Speaker = false;
var.hmChange = false;
endif
endif
endif

// if Hero Mode active
if var.HeroMode = true
Wiimote.Rumble = WiiGuitar.StrumUp || WiiGuitar.StrumDown;

if WiiGuitar.StrumUp || WiiGuitar.StrumDown
wiimote.Leds = 1
wait 0 ms
wiimote.Leds = 3
wait 0 ms
wiimote.Leds = 7
wait 0 ms
wiimote.Leds = 15
endif
endif;

//END OF FILE

and it is laggy, can anyone help me?
Back to top
View user's profile Send private message
Vattu



Joined: 11 Jan 2007
Posts: 96

Digg It
PostPosted: Mon Jul 21, 2008 2:12 pm    Post subject:

f WiiGuitar.Exists then var.found += "Guitar@Wiimote";

if var.found == "" then {
var.found = "No Guitar found - ";
}

if var.HeroMode then var.found += "@HeroMode";

var.found += (" - Battery: " + WiiMote.Battery) + "% - ";


doesn't that increase the length of var.found for every loop glovepie makes?

remove that shitty n00b-code, and try again.
Back to top
View user's profile Send private message
elmerohueso



Joined: 05 Mar 2007
Posts: 8

Digg It
PostPosted: Tue Jul 22, 2008 3:36 am    Post subject:

This is what I use and it works perfectly (and is much less code):

Code:
//Frets
LeftShift = Wiimote1.Guitar.Fret5
z = Wiimote1.Guitar.Fret4
x = Wiimote1.Guitar.Fret3
c = Wiimote1.Guitar.Fret2
v = Wiimote1.Guitar.Fret1
//Strumbar
Mouse.LeftButton = Wiimote1.Guitar.StrumDown
Mouse.RightButton = Wiimote1.Guitar.StrumUp
//Pause/Menu
Escape = Wiimote1.Classic.Minus
Enter = Wiimote1.Classic.Plus
//Whammy
Mouse.DirectInputX = Wiimote1.Guitar.WhammyBar
//Star Power + Rumble
Mouse.MiddleButton = Wiimote1.Pitch>60
if Wiimote1.Pitch>60
Wiimote.Rumble = 1
wait 1000ms
Wiimote.Rumble = 0
endif

//LED Battery Indicator
if var.ledmodei <> 1 then
if wiimote1.Battery <= 54 then
Wiimote.leds = 1
endif
if wiimote1.Battery <= 69 and >=55 then
Wiimote.leds = 3
endif
if wiimote1.Battery <=89 and >=70 then
Wiimote.leds = 7
endif
if wiimote1.Battery >=90 then
Wiimote.leds = 15
endif
endif
Back to top
View user's profile Send private message
wii_128



Joined: 07 Jul 2008
Posts: 61

Digg It
PostPosted: Wed Jul 30, 2008 5:17 pm    Post subject:

elmerohueso's script looks good and simple, but it doesn't have the rumble you wanted. So here is a modified version:

Code:
//Frets
LeftShift = Wiimote1.Guitar.Fret5
z = Wiimote1.Guitar.Fret4
x = Wiimote1.Guitar.Fret3
c = Wiimote1.Guitar.Fret2
v = Wiimote1.Guitar.Fret1

//Strumbar
Mouse.LeftButton = Wiimote1.Guitar.StrumDown
Mouse.RightButton = Wiimote1.Guitar.StrumUp

//Pause/Menu
Escape = (Wiimote1.Classic.Plus and (not(Wiimote1.Classic.Minus)))

//Whammy
Mouse.DirectInputX = Wiimote1.Guitar.WhammyBar

//Star Power + Rumble
Mouse.MiddleButton = ((20 < Wiimote.RawForceZ < 100)  or (Wiimote1.Classic.Minus and (not(Wiimote1.Classic.Plus))))
if ((20 < Wiimote.RawForceZ < 100)  or (Wiimote1.Classic.Minus and (not(Wiimote1.Classic.Plus))))
var.StarPower = 1
Wiimote.Rumble = 1
wait 1000ms
var.StarPower = 0
Wiimote.Rumble = 0
endif

// Guitar Joystick
Key.Left = (-1.2 < Wiimote1.Guitar.JoyX < -0.5) // Joystick moving Left = minus X axis
Key.Right = (0.5 < Wiimote1.Guitar.JoyX < 1.2) // Joystick moving Right = positive X axis
Key.Up = (-1.2 < Wiimote1.Guitar.JoyY < -0.5) // Joystick moving Up = negative Y axis
Key.Down = (0.5 < Wiimote1.Guitar.JoyY < 1.2) // Joystick moving Down = positive Y axis

// Hero Mode Swapping
if Wiimote1.Guitar.Plus && Wiimote1.Guitar.Minus && (0.6 < WiiGuitar.WhammyBar < 0.9) and var.HeroMode = 0 and var.SwapModeA = 0 then
var.HeroMode = 1
var.SwapModeB = 1
endif
if Wiimote1.Guitar.Plus && Wiimote1.Guitar.Minus && (0.6 < WiiGuitar.WhammyBar < 0.9) and var.HeroMode = 1 and var.SwapModeB = 0 then
var.HeroMode = 0
var.SwapModeA = 1
endif
if (not(0.6 < Wiimote1.Guitar.WhammyBar < 0.9)) and (var.HeroMode = 0) then
var.SwapModeA = 0
endif
if (not(0.6 < Wiimote1.Guitar.WhammyBar < 0.9)) and (var.HeroMode = 1) then
var.SwapModeB = 0
endif

// Hero Mode
if (Wiimote1.Guitar.StrumUp or Wiimote1.Guitar.StrumDown) and var.HeroMode = 1 and var.StarPower = 0 then
Wiimote1.Rumble = true
wait 100 ms
var.Rumbling = 1
wait 10 ms
Wiimote1.Rumble = false
else if var.Rumbling = 1 and var.StarPower = 0 then
Wiimote1.Rumble = true
wait 120 ms
var.Rumbling = 0
Wiimote1.Rumble = false
endif

// LEDs
if var.HeroMode = 0 then
Wiimote1.Leds = 1
endif
if var.HeroMode = 1 then
Wiimote1.Leds = 1
wait 100 ms
Wiimote1.Leds = 2
wait 100 ms
Wiimote1.Leds = 4
wait 100 ms
Wiimote1.Leds = 8
wait 100 ms
Wiimote1.Leds = 4
wait 100 ms
Wiimote1.Leds = 2
wait 100 ms
endif
Wiimote2.Leds = 2
Wiimote3.Leds = 4
Wiimote4.Leds = 8


Basically, I merged both scripts. Hope this is helpful, because it took me quite some time Very Happy
_________________
Proud member of the .Pie Making Community!

... not like we do much there, anyway. Try to keep us working at http://www.wiili.org/forum/glovepie-script-requests-t3881-s21.html
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Spamster



Joined: 21 Jul 2008
Posts: 2

Digg It
PostPosted: Sat Aug 30, 2008 3:15 pm    Post subject:

Thanks, I'll try them! Very Happy
Back to top
View user's profile Send private message
DOF



Joined: 03 Sep 2008
Posts: 1

Digg It
PostPosted: Wed Sep 03, 2008 7:38 pm    Post subject:

Can this script be modified to work with 2 wiimotes at the same time?
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