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 

GlovePIE Wii-Mote Scripts
Goto page Previous  1, 2, 3, 4, 5, 6 ... 53, 54, 55  Next
 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
View previous topic :: View next topic  
Author Message
ferno



Joined: 15 Dec 2006
Posts: 10
Location: Columbus, OH

Digg It
PostPosted: Fri Dec 15, 2006 5:38 pm    Post subject:

for the Mouse Control Script using IR by vkapadia, what would be the best way to change the speed of the mouse? i think it moves to fast
Back to top
View user's profile Send private message Send e-mail AIM Address
deceased
Site Admin


Joined: 11 Dec 2006
Posts: 287
Location: Aurora, ON

Digg It
PostPosted: Fri Dec 15, 2006 5:51 pm    Post subject:

ferno wrote:
for the Mouse Control Script using IR by vkapadia, what would be the best way to change the speed of the mouse? i think it moves to fast


I've been trying to figure that out, though not too adamantly. Best bet would be too ask him yourself (or hope he reads this).
_________________
-deceased-

Wiili - a gnu revolution
Back to top
View user's profile Send private message
kunalkunal2



Joined: 13 Dec 2006
Posts: 279

Digg It
PostPosted: Sun Dec 17, 2006 7:29 pm    Post subject:

i saw a video on youtube that there is a mariokart 64 scripts does anyone have it
and here is my super smash bros script i put the ledlighter things cuz it looked kool while playing:D


///Controls for Smash Bros (for project64, etc)
///posted by KunalKunal2

if wiimote.Up then
Key.left = true
wait 60 ms
Key.left = false
endif
if wiimote.Down then
Key.right = true
wait 60 ms
Key.right = false
endif
if wiimote.Left then
Key.down = true
wait 60 ms
Key.down = false
endif
if wiimote.Right then
Key.up = true
wait 60 ms
Key.up = false
endif
if wiimote.one
key.c = true
wait 60 ms
key.c = false
ENDIF
if wiimote.two
key.x = true
wait 60 ms
key.x = false
endif
if wiimote.Plus
key.enter = true
wait 60 ms
key.enter = false
endif
if wiimote.Minus
key.Ctrl = true
wait 60 ms
key.ctrl= false
endif
if wiimote.b
key.Z = true
wait 60 ms
key.Z= false
endif
if wiimote.A
key.s = true
wait 60 ms
key.s = true
endif
if var.setup = 0 then
var.setup = 1
var.lastLeds = 1
var.animate = 0
var.homeDown = 0
var.homePressed = 0
var.aniDir = 1
end if

if wiimote.home then
if var.homeDown = 1 then
var.homePressed = 0
else
var.homePressed = 1
var.homeDown = 1
end if
else
var.homePressed = 0
var.homeDown = 0
end if

if Wiimote.Minus then
if var.lastLeds = 1 then
var.lastLeds = 8
else if var.lastLeds = 2 then
var.lastLeds = 1
else if var.lastLeds = 4 then
var.lastLeds = 2
else if var.lastLeds = 8 then
var.lastLeds = 4
end if
wait 200ms
else if Wiimote.Plus then
if var.lastLeds = 1 then
var.lastLeds = 2
else if var.lastLeds = 2 then
var.lastLeds = 4
else if var.lastLeds = 4 then
var.lastLeds = 8
else if var.lastLeds = 8 then
var.lastLeds = 1
end if
wait 200ms
end if

if var.homePressed = 1 then
//if SingleClicked(wiimote.home) then //<-- SingleClicked() doesn't work as I would like.
if var.animate = 0 then
var.animate = 1
else if var.animate = 1 then
var.animate = 0
end if
end if

if var.animate = 1 then
if var.aniDir = 0 then
if var.lastLeds = 1 then
var.aniDir = 1
else if var.lastLeds = 2 then
var.lastLeds = 1
else if var.lastLeds = 4 then
var.lastLeds = 2
else if var.lastLeds = 8 then
var.lastLeds = 4
end if
else if var.aniDir = 1 then
if var.lastLeds = 1 then
var.lastLeds = 2
else if var.lastLeds = 2 then
var.lastLeds = 4
else if var.lastLeds = 4 then
var.lastLeds = 8
else if var.lastLeds = 8 then
var.aniDir = 0
end if
end if
wait 200ms
end if

wiimote.Leds = var.lastLeds
Back to top
View user's profile Send private message
Bipedal



Joined: 19 Dec 2006
Posts: 1

Digg It
PostPosted: Tue Dec 19, 2006 1:24 am    Post subject: piistol

My first coding adventure. Much thanks to squeakypants for getting me started. (read: basically writing the first 1/3 of the code for me.)

[I would post a link here. Except I'm not allowed to put them until I have 10 legitimate posts. Rather than trying to cheat around that, would someone trustworthy PM me and test it out so that they could post it themselves in this thread?]

Same basic idea as the wiinsaber. Put the gunsounds file into your glovepie folder. When I have some time later on i'll make it not so boring by adding different weapon choices. (I.E. standard pistol on dpad down, a rocket launcher on dpad up, an m16 on dpad left, some hand grenade on 1 or 2, you get the idea.)
_________________
lol internet.
Back to top
View user's profile Send private message Send e-mail AIM Address
US of Anarchy



Joined: 13 Dec 2006
Posts: 41

Digg It
PostPosted: Tue Dec 19, 2006 11:21 pm    Post subject: Nunchuck FPS

Here's my code for a generic fps control scheme using the nunchuck


Code:
/*
Wiimote FPS Controls by Freeman Speaketh/US of Anarchy

Version 1.0
-First release
Version 2.0
-Redesigned for nunchuck

Feel free to modify and redistribute, but leave this here
*/

// Controls nunchuck joystick
if Wiimote.nunchuk.joyy > .5 or < -.5 or wiimote.nunchuk.joyx > .5 or < -.5
Keyboard.shift = 1
else
Keyboard.shift = 0
endif

if Wiimote.nunchuk.joyy > .2
Keyboard.S = 1
Keyboard.S = 0
else if Wiimote.nunchuk.joyy < -.2
Keyboard.W = 1
Keyboard.W = 0
else
Keyboard.S = 0
Keyboard.W = 0
endif

if wiimote.nunchuk.joyx > .2
Keyboard.D = 1
Keyboard.D = 0
else if wiimote.nunchuk.joyx < -.2
Keyboard.A = 1
Keyboard.A = 0
else
Keyboard.D = 0
Keyboard.A = 0
endif

//Key assignments
Keyboard.Esc = Wiimote.Home
Keyboard.E = Wiimote.Nunchuk.zButton
Keyboard.ctrl = Wiimote.Nunchuk.cButton
Keyboard.G = wiimote.Down

//D-Pad left and right switch weapons
if wiimote.Right
mouse.wheeldown = 1
wait 50 ms
mouse.wheeldown = 0
else if wiimote.left
mouse.wheelup = 1
wait 50 ms
mouse.wheelup = 0
endif

//Mouse buttons
Mouse.LeftButton = Wiimote.B
Mouse.RightButton = Wiimote.A

//Pull the nunchuck up to jump
if Wiimote.Nunchuk.RawForceY >= 125
   Keyboard.Space = 1
else
    Keyboard.Space = 0
endif

if Wiimote.rawaccy <= -32
//Pull the wiimote up to reload
    Keyboard.R = 1
else
    Keyboard.R = 0
endif

//Controls rumble
if Wiimote.A >var.rumble or Wiimote.B > var.rumble
Wiimote.Rumble = 1
wait 50 ms
wiimote.Rumble = 0
var.rumble = 1
endif

if Wiimote.A = 0 and Wiimote.B = 0
Wiimote.rumble = 0
var.rumble = 0
endif

//Controls LEDs
if Wiimote.A xor Wiimote.B
Wiimote.leds = 15
wait 100 ms
Wiimote.leds = 0
wait 100 ms
endif

//Everything past here deals with mouse movement

//Precision
var.sense0 = 125
var.thresh0x = 5
var.thresh0y = 2

var.sense = 100
var.threshx = 10
var.threshy = 5

var.sense2 = 60
var.thresh2x = 15
var.thresh2y = 8

var.sense3 = 30
var.thresh3x = 20
var.thresh3y = 12

//first sensitivity setting
//xaxis

if Wiimote.rawaccx > var.thresh0x
mouse.x = mouse.x - 1/var.sense0
endif
if Wiimote.rawaccx < -var.thresh0x
mouse.x = mouse.x + 1/var.sense0
endif

//yaxis
if Wiimote.rawaccz > var.thresh0y
mouse.y = mouse.y - 1/var.sense0
endif
if Wiimote.rawaccz < -var.thresh0y
mouse.y = mouse.y + 1/var.sense0
endif


//second sensitivity setting
//xaxis
if Wiimote.rawaccx > var.threshx
mouse.x = mouse.x - 1/var.sense
endif
if Wiimote.rawaccx < -var.threshx
mouse.x = mouse.x + 1/var.sense
endif

//yaxis
if Wiimote.rawaccz > var.threshy
mouse.y = mouse.y - 1/var.sense
endif
if Wiimote.rawaccz < -var.threshy
mouse.y = mouse.y + 1/var.sense
endif

//third sensitivity setting
//xaxis
if Wiimote.rawaccx > var.thresh2x
mouse.x = mouse.x - 1/var.sense2
endif
if Wiimote.rawaccx < -var.thresh2x
mouse.x = mouse.x + 1/var.sense2
endif

//yaxis
if Wiimote.rawaccz > var.thresh2y
mouse.y = mouse.y - 1/var.sense2
endif
if Wiimote.rawaccz < -var.thresh2y
mouse.y = mouse.y + 1/var.sense2
endif

//fourth sensitivity setting
//xaxis
if Wiimote.rawaccx > var.thresh3x
mouse.x = mouse.x - 1/var.sense3
endif
if Wiimote.rawaccx < -var.thresh3x
mouse.x = mouse.x + 1/var.sense3
endif

//yaxis
if Wiimote.rawaccz > var.thresh3y
mouse.y = mouse.y - 1/var.sense3
endif
if Wiimote.rawaccz < -var.thresh3y
mouse.y = mouse.y + 1/var.sense3
endif


Controls are all explained in the code.
Back to top
View user's profile Send private message Send e-mail
Mienaikage



Joined: 13 Dec 2006
Posts: 54
Location: London, UK

Digg It
PostPosted: Tue Dec 19, 2006 11:24 pm    Post subject:

Code:
//Mienaikage's 4 player IR PPJoy script v0.6

ppjoy1.Analog0 = wiimote1.Nunchuk.JoyX
ppjoy1.Analog1 = wiimote1.Nunchuk.JoyY
ppjoy1.Digital16 = wiimote1.up
ppjoy1.Digital17 = wiimote1.down
ppjoy1.Digital18 = wiimote1.left
ppjoy1.Digital19 = wiimote1.Right
ppjoy1.digital9 = wiimote1.A
ppjoy1.digital1 = wiimote1.B
ppjoy1.digital2 = wiimote1.minus
ppjoy1.digital3 = wiimote1.home
ppjoy1.digital4 = wiimote1.plus
ppjoy1.digital5 = wiimote1.one
ppjoy1.digital6 = wiimote1.two
ppjoy1.digital7 = wiimote1.Nunchuk.CButton
ppjoy1.digital8 = wiimote1.Nunchuk.ZButton

if wiimote1.dot1vis or wiimote1.dot2vis = false
ppjoy1.Analog2 = 0.5
ppjoy1.Analog3 = 0.5
endif

if wiimote1.dot1vis + wiimote1.dot2vis = true
ppjoy1.Analog2 = (wiimote1.dot1x / 1023 + wiimote1.dot2x / 1023) / 2
ppjoy1.Analog3 = (wiimote1.dot1y / 767 + wiimote1.dot2y / 767) / 2
endif

ppjoy2.Analog0 = Wiimote2.Nunchuk.JoyX
ppjoy2.Analog1 = Wiimote2.Nunchuk.JoyY
ppjoy2.Digital16 = Wiimote2.up
ppjoy2.Digital17 = Wiimote2.down
ppjoy2.Digital18 = Wiimote2.left
ppjoy2.Digital19 = Wiimote2.Right
ppjoy2.digital9 = Wiimote2.A
ppjoy2.digital1 = Wiimote2.B
ppjoy2.digital2 = Wiimote2.minus
ppjoy2.digital3 = Wiimote2.home
ppjoy2.digital4 = Wiimote2.plus
ppjoy2.digital5 = Wiimote2.one
ppjoy2.digital6 = Wiimote2.two
ppjoy2.digital7 = Wiimote2.Nunchuk.CButton
ppjoy2.digital8 = Wiimote2.Nunchuk.ZButton

if Wiimote2.dot1vis or Wiimote2.dot2vis = false
ppjoy2.Analog2 = 0.5
ppjoy2.Analog3 = 0.5
endif

if Wiimote2.dot1vis + Wiimote2.dot2vis = true
ppjoy2.Analog2 = (Wiimote2.dot1x / 1023 + Wiimote2.dot2x / 1023) / 2
ppjoy2.Analog3 = (Wiimote2.dot1y / 767 + Wiimote2.dot2y / 767) / 2
endif

ppjoy3.Analog0 = Wiimote3.Nunchuk.JoyX
ppjoy3.Analog1 = Wiimote3.Nunchuk.JoyY
ppjoy3.Digital16 = Wiimote3.up
ppjoy3.Digital17 = Wiimote3.down
ppjoy3.Digital18 = Wiimote3.left
ppjoy3.Digital19 = Wiimote3.Right
ppjoy3.digital9 = Wiimote3.A
ppjoy3.digital1 = Wiimote3.B
ppjoy3.digital2 = Wiimote3.minus
ppjoy3.digital3 = Wiimote3.home
ppjoy3.digital4 = Wiimote3.plus
ppjoy3.digital5 = Wiimote3.one
ppjoy3.digital6 = Wiimote3.two
ppjoy3.digital7 = Wiimote3.Nunchuk.CButton
ppjoy3.digital8 = Wiimote3.Nunchuk.ZButton

if Wiimote3.dot1vis or Wiimote3.dot2vis = false
ppjoy3.Analog2 = 0.5
ppjoy3.Analog3 = 0.5
endif

if Wiimote3.dot1vis + Wiimote3.dot2vis = true
ppjoy3.Analog2 = (Wiimote3.dot1x / 1023 + Wiimote3.dot2x / 1023) / 2
ppjoy3.Analog3 = (Wiimote3.dot1y / 767 + Wiimote3.dot2y / 767) / 2
endif

ppjoy4.Analog0 = Wiimote4.Nunchuk.JoyX
ppjoy4.Analog1 = Wiimote4.Nunchuk.JoyY
ppjoy4.Digital16 = Wiimote4.up
ppjoy4.Digital17 = Wiimote4.down
ppjoy4.Digital18 = Wiimote4.left
ppjoy4.Digital19 = Wiimote4.Right
ppjoy4.digital9 = Wiimote4.A
ppjoy4.digital1 = Wiimote4.B
ppjoy4.digital2 = Wiimote4.minus
ppjoy4.digital3 = Wiimote4.home
ppjoy4.digital4 = Wiimote4.plus
ppjoy4.digital5 = Wiimote4.one
ppjoy4.digital6 = Wiimote4.two
ppjoy4.digital7 = Wiimote4.Nunchuk.CButton
ppjoy4.digital8 = Wiimote4.Nunchuk.ZButton

if Wiimote4.dot1vis or Wiimote4.dot2vis = false
ppjoy4.Analog2 = 0.5
ppjoy4.Analog3 = 0.5
endif

if Wiimote4.dot1vis + Wiimote4.dot2vis = true
ppjoy4.Analog2 = (Wiimote4.dot1x / 1023 + Wiimote4.dot2x / 1023) / 2
ppjoy4.Analog3 = (Wiimote4.dot1y / 767 + Wiimote4.dot2y / 767) / 2
endif
Back to top
View user's profile Send private message Visit poster's website
Cobalt`



Joined: 20 Dec 2006
Posts: 101

Digg It
PostPosted: Wed Dec 20, 2006 9:39 am    Post subject:

Rather simplistic, but works perfectly! The setup for L and R should change as it is painful to move your fingers in the right spot. Works along standard GBx games as well. Change the buttons to reflect your joystick settings.

Code:
// Visualboy Advance Controller Setup
// Copyright 2006 - Cobalt

// Directional Pad - Orientation (Left)
keyboard.Left = wiimote.Up
keyboard.Up = wiimote.Right
keyboard.Down = wiimote.Left
keyboard.Right = wiimote.Down

// Enter and Select Buttons
Enter = wiimote.A
Backspace = wiimote.B

// Save Game to State 1
keyboard.shift & keyboard.F1 = wiimote.Home

// Light up LED lights and Rumble to indicate state saved
if wiimote.Home
wiimote.Led1 = true
wait 10 ms
wiimote.Led1 = false
wiimote.Led2 = true
wait 10 ms
wiimote.Led2 = false
wiimote.led3 = true
wait 10 ms
wiimote.Led3 = false
wiimote.led4 = true
wait 10 ms
wiimote.led4 = false
wiimote.Rumble = 1
wait 100 ms
wiimote.Rumble = 0
endif

// A and B buttons
Z = wiimote.One
X = wiimote.Two

// R and L buttons
A = wiimote.Plus
S = wiimote.Minus


Last edited by Cobalt` on Thu Dec 21, 2006 2:35 am; edited 2 times in total
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
Goto page Previous  1, 2, 3, 4, 5, 6 ... 53, 54, 55  Next
Page 5 of 55

 
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