Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Simple glovepie mouse script for wiimote (good for demul games)  (Read 19939 times)

0 Members and 1 Guest are viewing this topic.

estrika

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:October 24, 2016, 09:54:15 am
well i share my glovepie script for anyone that needs it, its a simple script works perfect in resolution 1024*768 if you use another resolution i can tell you what to change in it. ( i have found many scripts but all of then made the mouse flycks to much if you understand me)
in demul there are games that the reload are buttons left and right simultaneasly, i have configured button 1 of wiimote to do this reload.

put this code in glovepie:


mouse.CursorPosX = smooth(1024-round((((wiimote1.dot1x+wiimote1.dot2x)/2)/1024)*1024),3)
mouse.CursorPosY = smooth(round((wiimote.dot1y/784)*768),3)
mouse.LeftButton = Wiimote.B and KeepDown(Wiimote.PointerVisible,0.5s)
mouse.RightButton = Wiimote.A and KeepDown(Wiimote.PointerVisible,0.5s)
mouse.MiddleButton = Wiimote.Home and KeepDown(Wiimote.PointerVisible,0.5s)
Key.Five = Wiimote.Plus
Key.One = Wiimote.Minus
mouse.RightButton + mouse.LeftButton = Wiimote.One

if you want rumble every time you press trigger - B button put this lines of code:

If Var.Rumble
Wiimote.Rumble = 1
Wait 100ms
Wiimote.Rumble = 0
Wait 50ms
EndIf

If Pressed(Var.Rumble1 or Var.Rumble2 or Var.Rumble3 or Var.Rumble4 or Var.Rumble6 or Var.Rumble7 or Var.Rumble8 or Var.Rumble9 or Var.Rumble10) or Pressed(Var.Rumble5)
Wiimote.Rumble = 1
Wait 80ms
Wiimote.Rumble = 0
EndIf

if you want to stop the script with 4 wiimote A+B+1+2 buttons press (3 seconds) put this line of code:

Var.ABZC = (Wiimote.A + Wiimote.B + Wiimote.One + Wiimote.Two)
if Var.ABZC then Var.Stop1 = 1
if Var.Stop1 then Var.Stop ++
if Var.Stop > 80 then Keyboard.LeftShift + P + I + E = 1
if (Var.ABZC = 0) then Var.Stop1 + Var.Stop = 0

i tested this script in all emulators that you can use mouse as lightgun works perfect.
my only problem is demul 057 that for some strange reason mouse doesnt work im stick to 056.


ok as you can see button + adds credits and button - start  player 1
again i tell that this script is ok for 1024*768 for others resolution needs change i can help with that.
« Last Edit: May 01, 2012, 01:01:02 am by estrika »

janeydoe

  • Trade Count: (0)
  • Newbie
  • *
  • Offline Offline
  • Posts: 1
  • Last login:November 04, 2012, 04:09:16 pm
  • I want to build my own arcade controls!
Re: Simple glovepie mouse script for wiimote (good for demul games)
« Reply #1 on: October 31, 2012, 07:23:52 pm »
Hi.  Could you please tell me how to amend the script for a 2560 x 1440 resolution?  Thanks.