[TUTO] Emulate Touch Screen with Xbox360 - Zelda, Ocarina of Time

Little tuto to emulate Touch Screen with Xbox 360 for The Legend of Zelda Ocarina of Time

Download GlovePIE : https://glovepie.en.softonic.com/

copy this script in GlovePIE and RUN the script before playing :

> //Zelda OoT 360 controller and touch screen
> 
> 
>     var.XMod = Screen.DesktopWidth/2560
>     var.YMod = Screen.DesktopHeight/1440
> 
> 
>     //Right to "ITEMS"
>     if Xinput.Right then {
>        //CHANGE THESE X AND Y CORDS TO CLICK WHEREVER YOU WANT!!
>        Mouse.CursorPosX = 2430*var.XMod
>        Mouse.CursorPosY = 1340*var.YMod
>        Mouse.LeftButton = 1
>     }else {
>        Mouse.LeftButton = 0
>        key.m = 0
>     }
> 
>     //Up to "MAP"
>     if Xinput.Up then {
>        //CHANGE THESE X AND Y CORDS TO CLICK WHEREVER YOU WANT!!
>        Mouse.CursorPosX = 2345*var.XMod
>        Mouse.CursorPosY = 1340*var.YMod
>        Mouse.LeftButton = 1
>     }else {
>        Mouse.LeftButton = 0
>        key.m = 0
>     }
> 
>     //Left to "GEAR"
>     if Xinput.Left then {
>        //CHANGE THESE X AND Y CORDS TO CLICK WHEREVER YOU WANT!!
>        Mouse.CursorPosX = 2260*var.XMod
>        Mouse.CursorPosY = 1340*var.YMod
>        Mouse.LeftButton = 1
>     }else {
>        Mouse.LeftButton = 0
>        key.m = 0
>     }
> 
> 
> 
> 
> 
>     //LB to I slot select
>     if Xinput.LeftShoulder then {
>        //CHANGE THESE X AND Y CORDS TO CLICK WHEREVER YOU WANT!!
>        Mouse.CursorPosX = 2525*var.XMod
>        Mouse.CursorPosY = 1075*var.YMod
>        Mouse.LeftButton = 1
>     }else {
>        Mouse.LeftButton = 0
>        key.m = 0
>     }
> 
>     //RB to II slot select
>     if Xinput.RightShoulder  then {
>        //CHANGE THESE X AND Y CORDS TO CLICK WHEREVER YOU WANT!!
>        Mouse.CursorPosX = 2525*var.XMod
>        Mouse.CursorPosY = 1320*var.YMod
>        Mouse.LeftButton = 1
>     }else {
>        Mouse.LeftButton = 0
>        key.m = 0
>     }
> 
> 
>      //Left thumb click ocarina
>     if Xinput.LeftThumb then {
>        //CHANGE THESE X AND Y CORDS TO CLICK WHEREVER YOU WANT!!
>        Mouse.CursorPosX = 2170*var.XMod
>        Mouse.CursorPosY = 1320*var.YMod
>        Mouse.LeftButton = 1
>     }else {
>        Mouse.LeftButton = 0
>        key.m = 0
>     }
> 
>     //Right thumb click to "VIEW" icon
>     if Xinput.RightThumb then {
>        //CHANGE THESE X AND Y CORDS TO CLICK WHEREVER YOU WANT!!
>        Mouse.CursorPosX = 2170*var.XMod
>        Mouse.CursorPosY = 1080*var.YMod
>        Mouse.LeftButton = 1
>     }else {
>        Mouse.LeftButton = 0
>        key.m = 0
>     }

Here for 2560/1440 display resolution. If you want to change reso, change the X-Y of each input with AutoIt : https://www.autoitscript.com/site/autoit/ to have the exact coordonate of your mouse.

You must play with large screen and fullscreen. No need to change the input in citra

1 Like

Note that it is easy to adapt to other games.

After writing “Xinput.” in the script, GlovePie automatically suggests keys. Obviously you have to use keys not used by your games.Then just find the coordinates of the touch keys with the mouse using AutoIt.

“Xinput.” is for xbox 360 controller. For keybord, it’s “Key.” For any controller, it’s “Any.” More information here : https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwiusZiIsrnYAhXJJ8AKHRxwB8AQFggoMAA&url=https%3A%2F%2Fcdn.instructables.com%2FORIG%2FF24%2F4X8Z%2FFG4AQVYY%2FF244X8ZFG4AQVYY.doc&usg=AOvVaw04pm5B0aBQ2IaOXMZBmunm