script for fps games
-
- One Eyed Hopeful
- Posts: 2
- Joined: Tue Jan 21, 2014 2:24 pm
script for fps games
anyone have a script for fps games using wiimote plus for mouse emulation and nunchuck for movement. iam new to this and i dont have any experience writing scripts.
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: script for fps games
Here is one using the Dpad on wiimote for walking, not tested just a quick mockup
Code: Select all
def motionUpdate():
mouse.deltaX = filters.deadband(filters.delta(wiimote[0].ahrs.yaw), 0.1) * scale
mouse.deltaY = filters.deadband(-filters.delta(wiimote[0].ahrs.pitch), 0.1) * scale
def buttonUpdate():
keyboard.setKey(Key.W, wiimote[0].nunchuck.buttons.button_down(WiimoteButtons.DPadUp))
keyboard.setKey(Key.S, wiimote[0].nunchuck.buttons.button_down(WiimoteButtons.DPadDown))
keyboard.setKey(Key.A, wiimote[0].nunchuck.buttons.button_down(WiimoteButtons.DPadLeft))
keyboard.setKey(Key.D, wiimote[0].nunchuck.buttons.button_down(WiimoteButtons.DPadRight))
if starting:
scale = 10
wiimote[0].enable(WiimoteCapabilities.MotionPlus)
wiimote[0].motionplus.update += motionUpdate
wiimote[0].buttons.update += buttonUpdate
-
- One Eyed Hopeful
- Posts: 2
- Joined: Tue Jan 21, 2014 2:24 pm
Re: script for fps games
thanks for your answer but i start it but nothing working and the script stops.i have the tr version of wiimote maybe thats the problem?
-
- One Eyed Hopeful
- Posts: 2
- Joined: Wed Aug 27, 2014 6:38 am
Re: script for fps games
I would like to know if anyone has already managed to create a script for battlefield 4 or Assetto Corsa or Project Cars as Freetrack.
Thanks in advanc