Force button push

Is there a way to make an event that force the game to press something, without the player press it?
I don't understand. You don't actually need the game to press a button if the player doesn't need to press it.
There is to simulate a button press, but it's probably not what you want to do.

Take an example of the old Mario games. When the player presses 'A', Mario jumps. Rather than simulate a button press of 'A', it would be better just to call the "jump" function.

So what action are you trying to do? We can suggest how to directly force that action.
Are you trying to make a tutorial sequence that shows the player how to navigate the menus something?
What im trying to do is to press the space/z/enter button in an event, so the character can show this cool animation. I'm using the chrono engine from mog hunter

It is so much easier just to stimulate press space/z/enter, then to make the animation it self, the animation is an attack animation, the character swing his sword to the enemy on the map not in the battle sequence
If you want the player to attack, use

Code:
$gamePlayer.commandRasWeapon()
Ow my god it work, thank you so much

Now can i stimulate the same thing but for npc? So they like having a sword fight on the map?
Ow my god it work, thank you so much

Now can i stimulate the same thing but for npc? So they like having a sword fight on the map?
Try replacing the $gamePlayer with "$gameMap.event(whatevertheeventnumberofyournpcis)"

Should work but haven't tested.

Original thread: https://forums.rpgmakerweb.com/threads/force-button-push.111411/