 |
WiiLi.org a new revolution
|
| View previous topic :: View next topic |
| Author |
Message |
L.C.E.C.
Joined: 12 Mar 2007 Posts: 15
Digg It |
Posted: Wed Mar 14, 2007 1:13 am Post subject: Red Steel -> Halo Script |
|
|
Hey, Can Someone Please Make A Script that will make Halo run identical to Red Steel Using IR Pointing With the following Exceptions?
Description Below, Picture under description:
- The A button simply zooms, no moving The Wii Remote forward, Please...
- "Stab" Is Replaced by Melee Attack, but changed so that you don't have to shake the nunchuck, but just move it forward "like a punch", so that it doesn't interfere with "Action"
- Please Make Flash Light The + Button.
- Make "Action" Moving The Nunchuck Up or down (both)
- Make "Show Scores" the "1" button
- Make the "-" button the "exchange weapon" button (For just in case you want to pick up a weapon, but do not want to get in a vehicle, ect.)
- Make "Pause" (Has to be the escape key) the "2" button.
Thanks in advance! 
Last edited by L.C.E.C. on Sat Mar 17, 2007 6:29 pm; edited 2 times in total |
|
| Back to top |
|
 |
Leight
Joined: 30 Jan 2007 Posts: 16
Digg It |
Posted: Wed Mar 14, 2007 4:09 am Post subject: Re: Red Steel -> Halo Script Please |
|
|
| Would be ALOT easier if you told us what button turned the flashlight on, like the other buttons. |
|
| Back to top |
|
 |
kunalkunal2
Joined: 13 Dec 2006 Posts: 279
Digg It |
Posted: Wed Mar 14, 2007 10:16 pm Post subject: |
|
|
Writing Script right now
What is the keyboard letter for showing scores? and the action button _________________ Check out my collection of my wii script's
freewebs.com/kunalkunal2 |
|
| Back to top |
|
 |
L.C.E.C.
Joined: 12 Mar 2007 Posts: 15
Digg It |
Posted: Wed Mar 14, 2007 10:59 pm Post subject: |
|
|
Wait? Can't It just be recognized as a "gamepad"? Oh well...
Anyway, the Key for "Show Score" is "F4"
And the Key for "Action" is "Q"
By the way, I said that flashlight was + on the WiiMote. |
|
| Back to top |
|
 |
kunalkunal2
Joined: 13 Dec 2006 Posts: 279
Digg It |
Posted: Thu Mar 15, 2007 1:58 am Post subject: |
|
|
Here you go.
Enjoy
| Code: | //Halo 1.1 Script
//by Kunal
//use nunchuk joystick for movement keys: WASD
if wiimote.Nunchuk.JoyY > 0.5
keyboard.S = wiimote.Nunchuk.JoyY
keyboard.W = 0
var.s = wiimote.Nunchuk.JoyY
var.w = 0
else
keyboard.W = wiimote.Nunchuk.JoyY
keyboard.S = 0
var.w = wiimote.Nunchuk.JoyY
var.s = 0
end if
if wiimote.Nunchuk.JoyX>0.5
keyboard.D = wiimote.Nunchuk.JoyX
keyboard.A = 0
var.d = wiimote.Nunchuk.JoyX
var.a = 0
else
keyboard.A = wiimote.Nunchuk.JoyX
keyboard.D = 0
var.a = wiimote.Nunchuk.JoyX
var.d = 0
end if
//Melee
//(From Carl's Tekken Script)
var.punch = keepdown(wiimote.nunchuk.RawForceZ < -100, 50ms)
keyboard.f = var.punch
//Action(keep nunchuk down,For now)
keyboard.e = Wiimote.Nunchuk.smoothPitch < -40 degrees
//other commands
mouse.LeftButton = wiimote.B //fire weapon
keyboard.z = wiimote.A //Zoom
keyboard.g = wiimote.Up //Switch Grenade
mouse.rightbutton = wiimote.Down //Throw Grenade
keyboard.tab = wiimote.Left //switch weapon
keyboard.r = wiimote.Right //reload
keyboard.Q = wiimote.Minus //flashlight
keyboard.x = wiimote.Plus //exchange weapon
keyboard.E = wiimote.One //action
keyboard.esc = wiimote.Two //switch grenade
keyboard.LeftAlt = wiimote.Nunchuk.ZButton //crouch
keyboard.Space = wiimote.Nunchuk.CButton //jump
var.bat = wiimote.Battery
//use wiimote x,z rotations for camera control, y rotation is unused
var.xOffset = 11
var.yOffset = 0 //unused
var.zOffset = 11
// Change this if you would like your mouse to go faster
var.xspeed = 1100
var.yspeed = 0 //unused
var.zspeed = 1100
// change these to a higher number if your hands are not steady or lower if they are
var.xCutoff = 1
var.yCutoff = 0 //unused
var.zCutoff = 1
//set rotations
var.xRot = Wiimote.RawForceX + var.xOffset
var.yRot = Wiimote.RawForceY + var.yOffset
var.zRot = Wiimote.RawForceZ + var.zOffset
//debug rotation values
debug = 'X:' + var.xRot + ', ' + 'mDIX:' + mouse.DirectInputX + ', ' + 'Z:' + var.zRot + ', ' + 'mDIY:' + mouse.DirectInputY
// This is the code that moves your mouse
if var.xRot > var.xCutoff then mouse.DirectInputX = mouse.DirectInputX - .001 * var.xspeed * (var.xRot - var.xCutoff)
if var.xRot < -var.xCutoff then mouse.DirectInputX = mouse.DirectInputX - .001 * var.xspeed * (var.xRot + var.xCutoff)
if var.zRot > var.zCutoff then mouse.DirectInputY = mouse.DirectInputY - .001 * var.zspeed * (var.zRot - var.zCutoff)
if var.zRot < -var.zCutoff then mouse.DirectInputY = mouse.DirectInputY - .001 * var.zspeed * (var.zRot + var.zCutoff)
|
_________________ Check out my collection of my wii script's
freewebs.com/kunalkunal2 |
|
| Back to top |
|
 |
L.C.E.C.
Joined: 12 Mar 2007 Posts: 15
Digg It |
Posted: Thu Mar 15, 2007 3:04 am Post subject: |
|
|
This is not what I wanted at all!!! I wanted IR POINTING, and If I knew you weren't going to make it a gamepad, and simply make it use some of my keyboard's keys, I would have told you all of them. Please Add IR Pointing, and Make The keys mapped like this.
Move forward W
Move Backward S
Move Left A
Move Right D
Jump SPACE
Crouch F
Flash Light TAB
Scope Zoom Wheel +
Action Q
Show Scores F4
Pause Escape |
|
| Back to top |
|
 |
Leight
Joined: 30 Jan 2007 Posts: 16
Digg It |
Posted: Fri Mar 16, 2007 2:00 am Post subject: |
|
|
No need to yell, he just tried to help and im sure it took him awhile to make that script.
I mixed Kunalkunal2's controls and Dr_zoidbergs IR aiming
I take no credit for any work except for mashing it.
(no i didnt test it so dont be mad if it doesnt work)
| Quote: | //Halo:Combat Evolved
//by Dr_Zoidberg, and kunalkunal2
//0 = directinput or xy = 1
if wiimote.two = true then
var.input = 0
endif
pie.FrameRate = 125
//rotation deadzone
var.rn = 36
pie.MouseDPI = 1600
//smoothsoftdeadzone
var.deadzone = 1
//adjust sensitivty mousedpi/100 works best
If not var.scrmultchngd = 1 then
var.scrmult = 16
endif
//areas for IR pointing ----------------
//direct pointing area
var.czonex = (screen.Width/1.5)/var.scrmult
var.czoney = (screen.Height/1.5)/var.scrmult
//faster direct pointing area
var.izonex = (screen.Width/3)/var.scrmult
var.izoney = (screen.Height/3)/var.scrmult
//continous movment around inner area
//-------------------------------------
//speed factors-----------------------
var.cfactor = 1
var.ifactor = 1/16
var.0factor = 1/40
//y-axis adjustment
var.factory = 1/1.1
//acceleration adjust
var.cpower = 0.02
var.ipower = 1.2
var.0power = 0.1
//-------------------------------------
//wiimoteroll convert
if var.onedot = 0
var.cos0 = var.cos
var.sin0 = var.sin
endif
var.roll = 0 - wiimote.roll
if var.roll < 0 then
var.roll = var.roll + 360
endif
var.cos = cos(var.roll)
var.sin = -sin(var.roll)
var.0cos = var.cos - var.cos0
var.0sin = var.sin - var.sin0
var.0cos = smooth(var.0cos,2)
var.0sin = smooth(var.0sin,2)
var.cos = smooth(var.cos,25)
var.sin = smooth(var.sin,25)
var.sinpitch = sin(wiimote.Pitch)
var.sinpitch = smooth(var.sinpitch,5)
if wiimote.dot1vis or wiimote.dot2vis then
//phantomdot creation if only one dot is visible
if (not wiimote.dot1vis) or (not wiimote.dot2vis) then
if var.onedot < pie.FrameRate
var.onedot ++
endif
//compensate for pitch
var.distf = 1+((abs(var.y)^1/768-1)*((abs(var.sinpitch)^1)*(var.dist-1))/(1024-1))*sign(var.sinpitch)*sign(var.y)
var.px = var.cos*var.dist*var.distf
var.py = var.sin*var.dist*var.distf
if wiimote.dot1vis then
var.d0x = (1024/2)- wiimote.dot1x
var.d0y = (768/2) - wiimote.dot1y
var.dot2f = 2
var.dot1f = 1
else
var.d0x = (1024/2)- wiimote.dot2x
var.d0y = (768/2) - wiimote.dot2y
var.dot1f = 2
var.dot2f = 1
endif
//check which dot is which
if sqrt(sqr(var.d0x-var.d1x)+sqr(var.d0y-var.d1y))*var.dot1f > sqrt(sqr(var.d0x-var.d2x)+sqr(var.d0y-var.d2y))*var.dot2f then
var.d3x = var.d1x
var.d3y = var.d1y
var.0d3x = var.d01x
var.0d3y = var.d01y
var.0d0x = var.d02x
var.0d0y = var.d02y
else
var.d3x = var.d2x
var.d3y = var.d2y
var.0d3x = var.d02x
var.0d3y = var.d02y
var.0d0x = var.d01x
var.0d0y = var.d01y
endif
//var.roll = var.roll - var.dr
if sqrt(sqr(var.d0x+var.px-var.d3x)+sqr(var.d0y+var.py-var.d3y)) > sqrt(sqr(var.d0x-var.px-var.d3x)+sqr(var.d0y-var.py-var.d3y)) then
var.px = var.px*(-1)
var.py = var.py*(-1)
endif
if var.onedot < 3 // set to +1 0sin / 0cos smooth value
//eliminte glitches at transition form 2 to 1 ir dots visible
var.0dx = var.px - var.0d3x + var.0d0x - var.0cos*var.dist
var.0dy = var.py - var.0d3y + var.0d0y - var.0sin*var.dist
endif
var.d2x = var.d0x + var.px - var.0dx
var.d2y = var.d0y + var.py - var.0dy
var.d1x = var.d0x
var.d1y = var.d0y
else
//read IR if both dots are visible
var.onedot = 0
var.d2x = (1024/2)- wiimote.dot2x
var.d2y = (768/2) - wiimote.dot2y
var.d1x = (1024/2)- wiimote.dot1x
var.d1y = (768/2) - wiimote.dot1y
var.dist = sqrt(sqr(var.d1x-var.d2x)+sqr(var.d1y-var.d2y))
endif
var.rotc = acos((var.d1x-var.d2x)/sqrt(sqr(var.d1x-var.d2x)+sqr(var.d1y-var.d2y)))
if ((var.d1y-var.d2y)/sqrt(sqr(var.d1x-var.d2x)+sqr(var.d1y-var.d2y))) > 0 then
var.rotc = 360 - var.rotc
endif
var.rots = - asin((var.d1y-var.d2y)/sqrt(sqr(var.d1x-var.d2x)+sqr(var.d1y-var.d2y)))
if ((var.d1x-var.d2x)/sqrt(sqr(var.d1x-var.d2x)+sqr(var.d1y-var.d2y))) < 0 then
var.rots = 180 - var.rots
endif
if var.rots < 0 then
var.rots = 360 + var.rots
endif
var.rot = var.rotc/2 + var.rots/2
//rotation neutralization
if (360 -var.rn) > abs(var.rot - var.roll) > (var.rn) then
var.rot = var.rot - 180
if var.rot < 0 then
var.rot = 360 + var.rot
endif
var.d0x = var.d1x
var.d0y = var.d1y
var.d1x = var.d2x
var.d1y = var.d2y
var.d2x = var.d0x
var.d2y = var.d0y
endif
//store last dots
if var.onedot = 0
var.d01x = var.d1x
var.d01y = var.d1y
var.d02x = var.d2x
var.d02y = var.d2y
endif
//smooth movement
var.d1x = smooth(var.d1x,2)
var.d1y = smooth(var.d1y,2)
var.d2x = smooth(var.d2x,2)
var.d2y = smooth(var.d2y,2)
//store last coordinates
var.0x = var.x
var.0y = var.y
//coordinate calculation
var.y = ((var.d1y*var.d2x)-(var.d1x*var.d2y)) / (sqrt(sqr(var.d2x-var.d1x) + sqr(var.d2y-var.d1y)))/((768))*screen.height/var.scrmult
var.x = (sqr(var.d1x)-sqr(var.d2x)+sqr(var.d1y)-sqr(var.d2y)) / (2*(sqrt(sqr(var.d2x-var.d1x) + sqr(var.d2y-var.d1y))))/(1024)*screen.Width/var.scrmult
//NAN bug workaround
if var.x = NAN then
var.x = 0
var.0x = 0
endif
if var.y = NAN then
var.y = 0
var.0y = 0
endif
//softsmoothdeadzone
if abs(var.x-var.0x) < var.deadzone then
var.x = var.x - ((var.x-var.0x)*(1-((abs((var.deadzone-abs(var.x-var.0x))/var.deadzone)))^0.5))
var.x = smooth(var.x,4)
endif
if abs(var.y-var.0y) < var.deadzone then
var.y = var.y - ((var.y-var.0y)*(1-((abs((var.deadzone-abs(var.y-var.0y))/var.deadzone)))^0.5))
var.x = smooth(var.x,4)
endif
var.x = smooth(var.x,2)
var.y = smooth(var.y,2)
if var.input = 0 then
if abs(var.x) > var.czonex
var.x = var.x*abs(1+(abs(abs(var.x)-var.czonex)/abs(var.x))*var.cpower)*var.cfactor
endif
if abs(var.y) > var.czoney
var.y = var.y*abs(1+(abs(abs(var.y)-var.czoney)/abs(var.y))*var.cpower*var.factory)*var.cfactor
endif
endif
if var.input = 1 then
mouse.x = smooth(((var.x/screen.Width*var.scrmult)*1.5 + 0.5),3)
mouse.y = smooth(((var.y/screen.Height*var.scrmult)*1.2 + 0.5),3)
endif
//fps mouse movement
if var.input = 0 then
if abs(var.x) > var.izonex then
var.inputx = var.inputx + var.x*abs((abs((abs(var.x)-var.izonex)^var.ipower)/abs(abs(var.x)^var.ipower)))*var.ifactor
endif
if abs(var.y) > var.izoney then
var.inputy = var.inputy + var.y*abs((abs((abs(var.y)-var.izoney)^var.ipower)/abs(abs(var.y)^var.ipower)))*var.ifactor
endif
var.inputx = var.inputx + var.x - var.0x
var.inputy = var.inputy + var.y - var.0y
mouse.DirectInputX = var.inputx
mouse.DirectInputY = var.inputy
endif
else
//continue mouse movement if no IR visible
if var.input = 0 then
if abs(var.x) > var.izonex then
var.InputX = var.InputX + var.x*abs((abs((abs(var.x)-var.izonex)^var.ipower)/abs(abs(var.x)^var.ipower)))*var.ifactor
else
var.InputX = var.InputX + var.x*abs(1+abs(var.x)*var.0power)*var.0factor
endif
if abs(var.y) > var.izoney then
var.InputY = var.InputY + var.y*abs((abs(abs(abs(var.y)-var.izoney)^var.ipower)/abs(abs(var.y)^var.ipower)))*var.ifactor
else
var.InputY = var.InputY + var.y*abs(1+abs(var.y)*var.0power*var.factory)*var.0factor
endif
mouse.directinputX = var.inputx
mouse.directinputY = var.inputy
endif
endif
if wiimote.Up then
var.scrmultchngd = 1
var.scrmult = var.scrmult*0.99
endif
if wiimote.Down then
var.scrmultchngd = 1
var.scrmult=var.scrmult/0.99
endif
//Nunchuckpart ----------------------
var.accsens = 15
if var.acc = 0 then
if abs(wiimote.Nunchuk.RelAccY) > var.accsens
var.acc = 1
keyboard.f = true
wait 10ms
keyboard.f = false
endif
if abs(wiimote.Nunchuk.RelAccX) > var.accsens
var.acc = 1
keyboard.g = true
wait 10ms
keyboard.g = false
endif
if abs(wiimote.Nunchuk.RelAccZ) > var.accsens
var.acc = 1
keyboard.e = true
wait 10ms
keyboard.e = false
endif
else
wait 500ms
var.acc = 0
endif
var.joysens = 0.3
var.wait = 20
var.nunjoydead0 = 1.5
var.nunjoydead1 = 0.05
var.waitpowert = 2
var.waitpowerf = 0.5
//Halo 1.1 Script
//by Kunal
//use nunchuk joystick for movement keys: WASD
if wiimote.Nunchuk.JoyY > 0.5
keyboard.S = wiimote.Nunchuk.JoyY
keyboard.W = 0
var.s = wiimote.Nunchuk.JoyY
var.w = 0
else
keyboard.W = wiimote.Nunchuk.JoyY
keyboard.S = 0
var.w = wiimote.Nunchuk.JoyY
var.s = 0
end if
if wiimote.Nunchuk.JoyX>0.5
keyboard.D = wiimote.Nunchuk.JoyX
keyboard.A = 0
var.d = wiimote.Nunchuk.JoyX
var.a = 0
else
keyboard.A = wiimote.Nunchuk.JoyX
keyboard.D = 0
var.a = wiimote.Nunchuk.JoyX
var.d = 0
end if
//Melee
//(From Carl's Tekken Script)
var.punch = keepdown(wiimote.nunchuk.RawForceZ < -100, 50ms)
keyboard.f = var.punch
//Action(keep nunchuk down,For now)
keyboard.e = Wiimote.Nunchuk.smoothPitch < -40 degrees
//other commands
mouse.LeftButton = wiimote.B //fire weapon
keyboard.z = wiimote.A //Zoom
keyboard.g = wiimote.Up //Switch Grenade
mouse.rightbutton = wiimote.Down //Throw Grenade
keyboard.tab = wiimote.Left //switch weapon
keyboard.r = wiimote.Right //reload
keyboard.Q = wiimote.Minus //flashlight
keyboard.x = wiimote.Plus //exchange weapon
keyboard.E = wiimote.One //action
keyboard.esc = wiimote.Two //switch grenade
keyboard.LeftAlt = wiimote.Nunchuk.ZButton //crouch
keyboard.Space = wiimote.Nunchuk.CButton //jump
var.bat = wiimote.Battery
// Uncomment the following 4 lines to make the analog stick emulate WASD
A = (-1.2 < wiimote.Nunchuk.JoyX < -0.5)
D = (0.5 < wiimote.Nunchuk.JoyX < 1.2)
W = (-1.2 < wiimote.Nunchuk.JoyY < -0.5)
S = (0.5 < wiimote.Nunchuk.JoyY < 1.2)
debug = ("dot1x: " + wiimote.dot1x+ " dot1y: " +wiimote.dot1y + " dot2x: " +wiimote.dot2x + " dot2y: " + wiimote.dot2y +" var.x: " +var.x + " var.y: " +var.y + " rot: " + var.rot +" roll: " + var.roll + " mouse: " + mouse.DirectInputPos +" batt: " +wiimote.Battery) |
|
|
| Back to top |
|
 |
|
|
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
|