How to "call" the custom plugin at the character event ?

I'm developing a game for my undergraduate.
I created an ajax plugin for javascript, but I don't know where to call it.
Do I call the plugin in the character event or simple event?

op.PNG


And how to write a custom plugin?
Comando de plugin = command plugin .


This is script.
ajax 2.PNG


servidor = server.
senha = password.
enviarDados = sendDice.
localidade = locality.
progresso = progress.
parametro = parameter.
apelido - nickname.
cadastraJogador = register player.
não foi possivel conectar com o servidor = could not connect to the server.

I need help with the ajax !!!
It's more a thread about how javascript works inside the engine, so I'm moving this thread to Learning Javascript.

Moved to Learning Javascript


The code from your plugin isn't included in the run time if you don't add the plugin to your project. Inside the engine, open the plugin manager and add your plugin. After that your code will be part of the game in the run time. Then, you'll be able to call your methods and objects from that plugin.

As for the plugin command event command, you can't call methods from the code through it. Plugin command will send an answer to the game interpreter. Plugin commands are taken care by this method:
Code:
Game_Interpreter.prototype.pluginCommand = function(command, args) {
    // to be overridden by plugins
};
Basically it parses the response (which is a string that the dev wrote in the plugin command text box) and from inside the code it redirects it to the appropriate place.
Hey there, I remember making an Unity platformer using kinect for controls to graduate at UENF.
Hope you don't mind, I'll keep it in english so others can read too.

Use "Script...". There you can actually call the functions. The "this" is not the event by the way.

Plugin Command by default does nothing, it is aliased and adds things to be used by some plugins.
.
Hey there, I remember making an Unity platformer using kinect for controls to graduate at UENF.
Hope you don't mind, I'll keep it in english so others can read too.

Use "Script...". There you can actually call the functions. The "this" is not the event by the way.

Plugin Command by default does nothing, it is aliased and adds things to be used by some plugins.

No problem, we have help our friends of developement.
Thank you very very very much, I will do it.

@barbara , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.


You can edit your post instead of posting multiple times in a row.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-call-the-custom-plugin-at-the-character-event.121433/