| View previous topic :: View next topic |
| Author |
Message |
Pat1487
Joined: 08 Jan 2007 Posts: 59
Digg It |
Posted: Mon Jan 15, 2007 1:19 am Post subject: Conkers Bad Fur Day for N64 (uses motion) |
|
|
My 2nd script
you can attack with the frying pan by moving the wiimote, and jump by moving the nunchuk
| Code: | /*
Conkers Bad fur day for Project 64
your controller settings in Project 64 (or whatever N64 emulator you use)
must be the following
Analog stick:
Up must be set to W
Left must be A
Right must be D
Down must be S
C Buttons:
C Up must be Home
C Left must be Delete
C Right must be PageDown
C Down must be End
Dpad:
Up must be Up arrow
Left must be Left arrow
Right must Right Up arrow
Down must be Down arrow
A must be X
B must be C
Start must be enter
L must be L
R must be R
Z must be Z
Wiimote controls:
the Nunchuk analog stick is the analog stick
A is A
B is B
Z is Z
Flicking the wiimote will act like B (which in conkers bad fur day will
attack with the frying pan)
Flicking the Nunchuck up will act like A (which will cause you to jump)
Home is Start
Plus is R
Minus is L
The dpad buttons are the C buttons (if your holding C on the nunchuk
the wiimotes dpad becomes the N64s dpad, im pretty sure you never
use the dpad in conkers bad fur day, but if you do the dpad is there)
*/
// Get Nunchuk axis locations. Range is -0.99 to 0.99
// Multiply by 100 to get whole numbers. (-99 to 99)
var.xNunchuk = Wiimote.Nunchuk.JoyX * 100
var.yNunchuk = Wiimote.Nunchuk.JoyY * 100
// X/Y offsets for Analog. If it's too sensative then make the numbers larger.
var.xOff = 11
var.yOff = 11
// Acceleration (default = 17.0)
var.nunchukAccy = 15.0
var.wiimoteAccX = 15.0
// Nunchuk Analog Movements -- The analog stick mapping was done by Marco Ceppi
if var.xNunchuk > var.xOff and var.yNunchuk > var.yOff then
key.w = false
key.a = false
key.s = true
key.d = true
else if var.xNunchuk > var.xOff and var.yNunchuk < -var.yOff then
key.w = true
key.a = false
key.s = false
key.d = true
else if var.xNunchuk < -var.xOff and var.yNunchuk < -var.yOff then
key.w = true
key.a = true
key.s = false
key.d = false
else if var.xNunchuk < -var.xOff and var.yNunchuk > var.yOff then
key.w = false
key.a = true
key.s = true
key.d = false
else if var.xNunchuk > var.xOff then
key.w = false
key.a = false
key.s = false
key.d = true
else if var.xNunchuk < -var.xOff then
key.w = false
key.a = true
key.s = false
key.d = false
else if var.yNunchuk < -var.yOff then
key.w = true
key.a = false
key.s = false
key.d = false
else if var.yNunchuk > var.yOff then
key.w = false
key.a = false
key.s = true
key.d = false
else
key.w = false
key.a = false
key.s = false
key.d = false
endif
// Game controls.
if !helddown(wiimote.Nunchuk.CButton, 1ms) then //dpad or c buttons
key.Home=wiimote.Up
key.Delete=wiimote.Left
key.PageDown=wiimote.Right
key.End=wiimote.Down
else
key.up=wiimote.Up
key.left=wiimote.Left
key.right=wiimote.Right
key.down=wiimote.Down
endif
key.Z=wiimote.Nunchuk.ZButton
key.Enter=wiimote.Home
key.L=wiimote.Minus
key.R=wiimote.Plus
key.x=wiimote.A
key.c=wiimote.B
// Jump
if Wiimote.Nunchuk.RawAccy > var.nunchukAccy or < -var.nunchukAccy then
key.x = true
wait 1ms
key.x = false
endif
//Attack
if Wiimote.RawAccX > var.wiimoteAccX or < -var.wiimoteAccX then
key.c = true
wait 1ms
key.c = false
endif |
I think this would be a good script for just about any 3rd person adventure game, like super mario 64, but i havent actually tried it with any other N64 game yet |
|
| Back to top |
|
 |
Predator04
Joined: 15 Jan 2007 Posts: 29
Digg It |
Posted: Mon Jan 15, 2007 5:57 am Post subject: |
|
|
Sweet Thank You!  |
|
| Back to top |
|
 |
Pat1487
Joined: 08 Jan 2007 Posts: 59
Digg It |
Posted: Mon Jan 15, 2007 7:48 pm Post subject: |
|
|
Update:
Cleaned up the code alot
Analog stick should work better now
Fixed a problem with the C buttons messing up
Known Problems:
Using the nunchuk to jump doesnt work to well because of the way you have to jump in conkers bad fur day, just use A for now
| Code: | /*
Conkers Bad fur day for Project 64
your controller settings in Project 64 (or whatever N64 emulator you use)
must be the following
Analog stick:
Up must be set to W
Left must be A
Right must be D
Down must be S
C Buttons:
C Up must be Home
C Left must be Delete
C Right must be PageDown
C Down must be End
Dpad:
Up must be Up arrow
Left must be Left arrow
Right must Right Up arrow
Down must be Down arrow
A must be X
B must be C
Start must be enter
L must be L
R must be R
Z must be Z
Wiimote controls:
the Nunchuk analog stick is the analog stick
A is A
B is B
Z is Z
Flicking the wiimote will act like B (which in conkers bad fur day will
attack with the frying pan)
Flicking the Nunchuck up will act like A (which will cause you to jump)
Home is Start
Plus is R
Minus is L
The dpad buttons are the C buttons (if your holding C on the nunchuk
the wiimotes dpad becomes the N64s dpad, im pretty sure you never
use the dpad in conkers bad fur day, but if you do the dpad is there)
*/
// Get Nunchuk axis locations. Range is -0.99 to 0.99
// Multiply by 100 to get whole numbers. (-99 to 99)
var.xNunchuk = Wiimote.Nunchuk.JoyX * 100
var.yNunchuk = Wiimote.Nunchuk.JoyY * 100
// If the analog stick is too sensitive then make this number larger,
//if its not sensitive enough then make this number smaller.
var.AnalogSensitivity = 20
// Acceleration Sensitivity (default = 17.0), the force you have to put
//into swinging the nunchuk or wiimote to make the action happen
//lower makes it take less movement, higher makes it take more
var.ForceSensitivity = 15.0
// Nunchuk Analog Movements
key.D = (var.xNunchuk > var.AnalogSensitivity)
key.S = (var.yNunchuk > var.AnalogSensitivity)
key.A = (var.xNunchuk < -var.AnalogSensitivity)
key.W = (var.yNunchuk < -var.AnalogSensitivity)
// Game controls.
if !helddown(wiimote.Nunchuk.CButton, 1ms) then //dpad or c buttons
key.Up=false
key.left=false
key.right=false
key.down=false
key.Home=wiimote.Up
key.Delete=wiimote.Left
key.PageDown=wiimote.Right
key.End=wiimote.Down
else
key.Home=false
key.delete=false
key.pagedown=false
key.end=false
key.up=wiimote.Up
key.left=wiimote.Left
key.right=wiimote.Right
key.down=wiimote.Down
endif
key.Z=wiimote.Nunchuk.ZButton
key.Enter=wiimote.Home
key.L=wiimote.Minus
key.R=wiimote.Plus
key.x=wiimote.A
key.c=wiimote.B
key.x=Wiimote.Nunchuk.RawAccy > var.ForceSensitivity or < -var.ForceSensitivity
key.c=Wiimote.RawAccX > var.ForceSensitivity or < -var.ForceSensitivity |
I cant edit my last post so if I want to update it i have to keep making replies |
|
| Back to top |
|
 |
Predator04
Joined: 15 Jan 2007 Posts: 29
Digg It |
Posted: Tue Jan 16, 2007 1:47 am Post subject: |
|
|
Sweet. i found the jumping to be fine in the first script. i will try this new one out later. thanks for the update  |
|
| Back to top |
|
 |
|