Button Input

This is stright of the script call sheet from the forum and I can't get it to work for the life of me.

if(Input.keyTriggered("t")){

var xPos = $gamePlayer.screenX();
var yPos = $gamePlayer.screenY();

$gameScreen.startZoom(xPos-20, yPos-30, 5, 10);


}

I got the Yanfly plugin for the button config, but its rejecting even if "ok" or something along those line is placed.

How do I create if condition attached to button input through scripting? Thanks
Try this instead:
Code:
if (Input.isTriggered('ok')) {
 // Do stuff
}

The above code will happen one time once the ok key is pressed. If you want it to happen multiple times use this:
Code:
if (Input.isPressed('ok')) {
 // Do stuff
}
Try this instead:
Code:
if (Input.isTriggered('ok')) {
 // Do stuff
}

The above code will happen one time once the ok key is pressed. If you want it to happen multiple times use this:
Code:
if (Input.isPressed('ok')) {
 // Do stuff
}

Hero! And @Nicke I just seen your 2 new plugins they look really good aswell!

Please mark as answered 🙂 😀
Happy to help out! 🙂

Original thread: https://forums.rpgmakerweb.com/threads/button-input.83772/