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 

[REQ] Breakout Script
Goto page Previous  1, 2
 
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Scripts
View previous topic :: View next topic  
Author Message
Predator04



Joined: 15 Jan 2007
Posts: 29

Digg It
PostPosted: Wed Jan 17, 2007 9:17 am    Post subject:

Updated the Script

Code:
/*
Hold the wiimote horizontally, like an NES controller, use the dpad
to move the paddle (Or up and down for other breakout games), 1 or 2 to shoot, and home to go to the menu

Nunchuck- left right to move paddle (Up and down for other games) Z or C to shoot.

Script Created by Pat1487 Edited by Predator04
Other help Kunal Khiyani's nunchuk mouse Script

*/
var.PaddleSpeed = 18
//Make PaddleSpeed lower if the paddle is moving to fast for you
//or higher if its to slow


//Rumble
if Wiimote.Two then
    Wiimote.Rumble = True
    Wait 100ms
    Wiimote.Rumble = False
    end if
if Wiimote.One then
    Wiimote.Rumble = True
    Wait 100ms
    Wiimote.Rumble = False
    end if

//Nunchuk
if (-1.2 < wiimote.Nunchuk.JoyY < -0.5) {
  Mouse.DirectInputY = Mouse.DirectInputY - 18;
}
if (0.5 < wiimote.Nunchuk.JoyY < 1.2) {
  Mouse.DirectInputY = Mouse.DirectInputY + 18;
}
if (-1.2 < wiimote.Nunchuk.JoyX < -0.5) {
  Mouse.DirectInputX = Mouse.DirectInputX - 18;
}
if (0.5 < wiimote.Nunchuk.JoyX < 1.2) {
  Mouse.DirectInputX = Mouse.DirectInputX + 18;
}

if wiimote.down then
mouse.CursorPosX =mouse.CursorPosX + var.PaddleSpeed
elseif wiimote.Up then
mouse.CursorPosX =mouse.CursorPosX - var.PaddleSpeed
end if

if wiimote.Left then
mouse.CursorPosY =mouse.CursorPosY + var.PaddleSpeed
elseif wiimote.Right then
mouse.CursorPosY =mouse.CursorPosY - var.PaddleSpeed
endif


mouse.LeftButton=wiimote.One
mouse.LeftButton=wiimote.Two
mouse.Leftbutton = wiimote.nunchuk.zbutton
mouse.Leftbutton = wiimote.nunchuk.cbutton
key.Escape=wiimote.Home
Back to top
View user's profile Send private message
Pat1487



Joined: 08 Jan 2007
Posts: 59

Digg It
PostPosted: Wed Jan 17, 2007 9:55 pm    Post subject:

Code:
/*Aztec Bricks (any blockbreaker or breakout type game)

V2
Added motion for the paddle
Nunchuk mouse control

Turn the wiimote from side to side to move the paddle back and forth
Analog stick on the nunchuk controls the mouse
Home goes to the menu
Buttons A, B, C, and Z can all be used to shoot

Controls based on Predator04's
*/
var.PaddleSpeed = 18
//Make PaddleSpeed lower if the paddle is moving to fast for you
//or higher if its to slow

if wiimote.Roll > 20
mouse.DirectInputX=mouse.DirectInputX+var.PaddleSpeed
elseif wiimote.Roll<-20
mouse.DirectInputX=mouse.DirectInputX-var.PaddleSpeed
endif

Inc(Mouse.DirectInputX, DeadZone(Wiimote.Nunchuk.JoyX)*var.PaddleSpeed)
Inc(Mouse.DirectInputY, DeadZone(Wiimote.Nunchuk.JoyY)*var.PaddleSpeed)

mouse.LeftButton&&wiimote.Rumble = wiimote.A or wiimote.B or wiimote.nunchuk.zbutton or wiimote.nunchuk.cbutton
key.Escape=wiimote.Home

debug = wiimote.gx + "    " + wiimote.Roll
Back to top
View user's profile Send private message
Predator04



Joined: 15 Jan 2007
Posts: 29

Digg It
PostPosted: Wed Jan 17, 2007 10:35 pm    Post subject:

i never was good at adding alot of code to make it simple, always did it the hard way lol thanks alot Razz
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
Goto page Previous  1, 2
Page 2 of 2

 
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