Author Topic: GlovePIE Script for FPS type games  (Read 12765 times)

Offline Wolfman5750

  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
on: December 15, 2012, 07:20:21 PM
I know there seems to be a lot of different GlovePIE scripts for FPS games, but none of them seemed to fit what I was looking for. So, I decided to try to modify the ones I could find to fit what I pictured.

Here was my idea. I would use the mouse position to pull the mouse cursor in the direction of the Wiimote pointer. The speed of the mouse pointer would depend on the Wiimote pointer's distance from center. But, I wanted to be able to toggle between that and directly controlling the mouse pointer (useful for menus or possibly different types of games).  Another thing is that I wanted to do was have an optional script for aiming, so that when you aimed your weapon (rmb in FPS games normally), that the aiming response would slow down, making targeting easier.

The two mouse scripts I found that worked the best for me are Carl Kenner's IR Mouse script and Lednerg's MotionPlus mouse script. I tried modifying Lednerg's script to change the mouse position based on the distance of the Wiimote from neutral, but it started getting messy, and, eventually, I broke the script. So, I decided to stick with Carl Kenner's IR Mouse Script.

The script works great with moving the character around. It works like I pictured. Aiming.... not so much.... Aiming just seems to be difficult.

Here are some of my questions:

1. To control mouse movement, I am adding and subtracting from direct input. The mouse's response is a parabola:
    'amount to move mouse' = 'sensitivity' * 'wiimote distance from center'^2

This doesn't seem to work well with aiming. Does anyone know of a different response that will feel better/easier to do with the wiimote?

2. Carl Kenner's script originally mapped the wiimote's position directly to the mouse pointer. The mouse is set up to move from 0 to 1, 0 being one side of the screen, and 1 being the other. The problem is that for this to work in most games, GlovePIE has to send the mouse instructions through directinput, right? Where this is easy with the first mouse type, it is more difficult with directly mapping the wiimote to the mouse. Does anyone know how to set the cursor position based on the wiimote's position using directinput? Could it be done by setting GlovePIE's DPI to a known value?

I've attached the script. There aren't any huge changes from Carl Kenner's original script. I haven't put many comments in at the moment, but I will as I build on it.

Thanks for your help