Script call for touch screen conditional?

The conditional script allows us to trigger an action on button press, but I'm not sure how to do the same for a touch input or a click.


Is there a script call I could use for the conditional to check to see if the player has clicked the mouse or touched the touchscreen anywhere?


Thanks in advance!
Touchscreens and mouse input are interpreted as button presses in the Input code, so it should register them as a click to the action button. 


You can test this by trying to click with the mouse.
Touchscreens and mouse input are interpreted as button presses in the Input code, so it should register them as a click to the action button. 


You can test this by trying to click with the mouse.



I attempted this by having a script interrupted with the "OK" button (or the cancel button) conditional. Works fine on a keyboard when pressing enter, but it doesn't work when deployed on an iOS device with a touch screen.


I might be able to have it interrupt by pressing a button via a yanfly addon, but I was really hoping to be able to have it trigger by tapping or clicking anywhere...


EDIT: Scratch that: if a script is running, a physical button press registering can interrupt it, but pressing one of Yanfly's buttons will not override an already running script. :\


Thus, I NEED to figure out how to make a touch screen press register as a button without needing a common event to do so...

EDIT2:

I think this is where I need to look...

/**
 * Checks whether the left mouse button or touchscreen is just pressed.
 *
 * @static
 * @method isTriggered
 * @return {Boolean} True if the mouse button or touchscreen is triggered
 */
TouchInput.isTriggered = function() {
    return this._triggered;
};


I'm just not sure how I'd turn this into a conditional that I could use to determine when the screen was just touched...
if (TouchInput.isTriggered()) {


...


}
if (TouchInput.isTriggered()) {


...


}



Like a boss, Shaz. 😀


Like...a...boss!
you did all the hard work yourself 😉

Original thread: https://forums.rpgmakerweb.com/threads/script-call-for-touch-screen-conditional.70582/