| View previous topic :: View next topic |
| Did you Like my Script |
| Yes |
|
75% |
[ 3 ] |
| No |
|
25% |
[ 1 ] |
|
| Total Votes : 4 |
|
| Author |
Message |
oobis
Joined: 20 Feb 2007 Posts: 3
Digg It |
Posted: Tue Feb 20, 2007 11:23 pm Post subject: A Link To The Past Script By me :) |
|
|
This is my first Script so it may not be that good
well Here
| Code: | // This WiiMote Script is for A Link to the Past
// By: oobis
// Pleas do not take my work. DO NOT POST FOR YOUR SELF
// Version 1.0
// set your Snes Emu controls to:
// Up = Up
// Down = Down
// Left = Left
// Right = Right
// Start = S
// Select = T
// A = A
// B = B
// X = X
// Y = Y
// L = L
// R = R
// Controls:
// A Button (Pick Up Pots/Open chests/lift up bushes)
// D-Pad (hold it like you would with Excite Truck)
// Home Button (Start Button)
// - (is select)
// B Button (Is Main Item)
// 2 Button (is to swing your sword you can also flick the wiimote)
// 1 Button (is for the Map)
//
//
// Moving Around
up = Wiimote.Right
left = Wiimote.Up
Down = Wiimote.Left
Right = Wiimote.down
// Other Buttons
S = WiiMote.home
t = WiiMote.Minus
a = WiiMote.A
y = WiiMote.B
x = WiiMote.1
B = Wiimote.2
if (wiimote.RelAccX > 25) or (wiimote.RelAccY > 25) or (wiimote.RelAccZ > 15) then
B = true
wiimote.Rumble = true
wait 60 ms
B = false
wait 100 ms
wiimote.Rumble = false
End If
// Battery Bar
var.Batt = wiimote.Battery / 48
if true then
wait 5 seconds
end if
var.Blink = 500ms
debug = "Battery Bar " + 100*48*var.Batt/192 + "%"
if 0<=var.Batt<=0.25 then
Wiimote.Leds = 1
wait var.Blink
Wiimote.Leds = 0
wait var.Blink
elseif 0.25 < var.Batt<=1 then
Wiimote.Leds = 1
elseif 1 < var.Batt<=1.25 then
Wiimote.Leds = 3
wait var.Blink
Wiimote.Leds = 1
wait var.Blink
elseif 1.25 < var.Batt<=2 then
Wiimote.Leds = 3
elseif 2 < var.Batt<=2.25 then
Wiimote.Leds = 7
wait var.Blink
Wiimote.Leds = 3
wait var.Blink
elseif 2.25 < var.Batt<=3 then
Wiimote.Leds = 7
elseif 3 < var.Batt<=3.25 then
Wiimote.Leds = 15
wait var.Blink
Wiimote.Leds = 7
wait var.Blink
elseif 3.25 < var.Batt<=4 then
Wiimote.Leds = 15
else
Wiimote.Leds = 0
End If |
// set your Snes Emu controls to:
Up = Up
Down = Down
Left = Left
Right = Right
Start = S
Select = T
A = A
B = B
X = X
Y = Y
L = L
R = R
// Controls:
A Button (Pick Up Pots/Open chests/lift up bushes)
D-Pad (hold it like you would with Excite Truck)
Home Button (Start Button)
- (is select)
B Button (Is Main Item)
2 Button (is to swing your sword you can also flick the wiimote)
1 Button (is for the Map)
Last edited by oobis on Sun May 06, 2007 3:34 pm; edited 1 time in total |
|
| Back to top |
|
 |
SwedishFrog Site Admin

Joined: 25 Jan 2007 Posts: 273 Location: New York
Digg It |
Posted: Wed Feb 21, 2007 8:52 pm Post subject: |
|
|
Pretty cool script, man. Welcome aboard
but what's up with this part:
if true then
wait 5 seconds
endif
I don't understand the purpose of this code. It seems to do nothing. |
|
| Back to top |
|
 |
oobis
Joined: 20 Feb 2007 Posts: 3
Digg It |
Posted: Wed Feb 21, 2007 9:03 pm Post subject: I forget |
|
|
| LoL i forget why i put that there lol ;p |
|
| Back to top |
|
 |
the-white_knight3
Joined: 27 Jan 2007 Posts: 31
Digg It |
Posted: Wed Mar 14, 2007 7:24 pm Post subject: |
|
|
| Your working with the battery bar there. You need the wait 5 seconds to give the remote time to communicate. That's why you have it in there. |
|
| Back to top |
|
 |
Vattu
Joined: 11 Jan 2007 Posts: 96
Digg It |
Posted: Wed Mar 14, 2007 7:34 pm Post subject: |
|
|
| I thought that glovepie only holds everything inside the if-statement, while everything else get executed. |
|
| Back to top |
|
 |
|