• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Controllers v
« Previous 1 ... 218 219 220 221 222 ... 320 Next »

mouse camera control "script" thingy
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
mouse camera control "script" thingy
06-04-2013, 09:23 AM
#1
bluesharp
Unregistered
 
Information 
hey guys im new here...

today i tried to find the best keyboard/mouse configuration for Monster Hunter try and the mouse response is very slow...
i found a topic on this forum about this issue but i can no longer find it...
meanwhile i tried and succeed to make a little script in auto-it that maps a certain button to the position of the cursor on the screen.
in other words if mouse is to the very edge of the screen it will trigger a button press and thus moving the camera (very similar to PC RTS camera control)
if whoever made that topic that i found back than still needs this and fits their need... ill attach the file here.

how to use
- it only works on 1680X1050 (but that can easily be adjusted)
- bound keys are u i o p(use this like in picture)
- activation keys are 6 7 8 9 (non numpad)
- keys 6 and 7 activates/deactivates the master (vertical axis not activated here)
- keys 8 and 9 activates/deactivates vertical axis(used in water battles in MH3 and will not run unless the master is active)

other notes.
a) its possible that it might not work for since one line of code in there makes it run only when the emulator screen is active(if class is not the same it will not work)
b) sometime its glitchy and i spams random buttons like caps lock or ctrl.. so if it freaks out , killing auto-it.exe procces seems to fix it
c) i had no previous experience with autoit so whatever other bugs it has,i cant help u too much.sorry :(
d) the code is very basic and "dirty", perhaps someone could provide a more elegant aproach.

download and install auto it and then run this script

hope it helps someone :)

Code:
#include <Misc.au3>

Local $hDLL = DllOpen("user32.dll")

#include <GUIConstantsEx.au3>

Opt("GUIOnEventMode", 1)
global $water
Global $run
Global $ExitID
$KeyToPress1 = "o"
$KeyToPress2 = "p"
$KeyToPress3 = "u"
$KeyToPress4 = "i"
_Main()

Func _Main()
    $water=0
    
    Local $YesID, $NoID

    GUICreate("Monster Hunter tri mouse binder", 210, 100)

    GUICtrlCreateLabel("6-activate", 10, 10)
    GUICtrlCreateLabel("7-deactivate", 10, 30)
    GUICtrlCreateLabel("8-activate water mode", 10, 50)
    GUICtrlCreateLabel("9-deactivate water mode", 10, 70)
    GUISetOnEvent($GUI_EVENT_CLOSE, "OnExit")

    GUISetState()
     while 1
       If _IsPressed("36",$hDLL) Then
           $run=1
           Beep(1000,100)
           Sleep(250)
       EndIf
    
       If _IsPressed("37", $hDLL) Then
           $run=0
           Beep(500,100)
           Sleep(250)
       EndIf
    
       If _IsPressed("38", $hDLL) Then
           $water=1
           Beep(1000,100)
           Sleep(250)
       EndIf
    
       If _IsPressed("39", $hDLL) Then
           $water=0
           Beep(500,100)
           Sleep(250)
       EndIf
    
       if WinActive("[CLASS:wxWindowNR]","") then
        
      
        if $run=1 Then
            Local $pos = MouseGetPos()
           if $water=1 Then
  
  
              if $pos[1]<100 then
                 Send ("{"&$KeyToPress3&" DOWN}")
              EndIf

              if $pos[1]>100 then
                 Send ("{"&$KeyToPress3&" UP}")
              EndIf

              if $pos[1]>1000 then
                Send ("{"&$KeyToPress4&" DOWN}")
              EndIf

              if $pos[1]<1000 then
                 Send ("{"&$KeyToPress4&" UP}")
              EndIf
              
         EndIf
  
              if $pos[0]<100 then
                 Send ("{"&$KeyToPress1&" DOWN}")
              EndIf

              if $pos[0]>100 then
                 Send ("{"&$KeyToPress1&" UP}")
              EndIf

              if $pos[0]>1500 then
                 Send ("{"&$KeyToPress2&" DOWN}")
              EndIf

              if $pos[0]<1500 then
                 Send ("{"&$KeyToPress2&" UP}")
             EndIf
        
    
          
         EndIf
        EndIf
     WEnd
    
EndFunc   ;==>_Main



Func OnExit()

    Exit
EndFunc   ;==>OnExit


Attached Files Thumbnail(s)
   
Reply
06-04-2013, 09:30 AM (This post was last modified: 06-04-2013, 09:32 AM by Lumbeeslayer.)
#2
Lumbeeslayer Offline
Senior Member
****
Posts: 348
Threads: 37
Joined: Mar 2013
you ever heard of a controller?
you can hook wii remote to pc you know that right? all u need is a bluetoothdongle you can then use it to play your game.
also a 360 controller also works for dolphin
controllers work best for dolphin, just use a controller instead of mouse and keyboard
Find
Reply
06-04-2013, 09:39 AM
#3
bluesharp
Unregistered
 
(06-04-2013, 09:30 AM)Lumbeeslayer Wrote: you ever heard of a controller?
you can hook wii remote to pc you know that right? all u need is a bluetoothdongle you can then use it to play your game.
also a 360 controller also works for dolphin
controllers work best for dolphin, just use a controller instead of mouse and keyboard
i dont like it with controller... if i wanted that i could just simply play it on the console.
but that game was designed with wii gamepad and playign with remote/nunchuck is wierd. i tried the gamepad and the analog sticks work like digital.. so mouse is a much finer option here...either that or im setting my gamepad wrong
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode