What's new

RPG Maker VX Ace Script calling:


Frostleaf

Demon Girl
Joined
Jun 1, 2015
Messages
112
Reputation score
69
Ok after some trial and errors I finally found a way to get a common event to call a script function up.
Code1:
This goes in the common event that have to get triggered by something...
-Common Event insert-
Script:
<name here>

Code 2:
This is in an empty script page in script editor...
Script Editor:
class Game_Interpreter #It calls for the Game Interpreter command list so it can find what it needs for this script to work...
def <Name here>(target) #The Def is just definition of the name, (target) is the actors ID please make sure you have the actor id set to the player actor ID IDK what would happen if its set to other party members never really got into this much...
# The code1 is the in game common event script <Pls make a button map event or a key script to activate this common event in the data base. This way when its triggered it will then call up the scripts data base and look for what ever that name is in " Def <Name here>(target)" and yes you can change only the "<Name here>" to what ever you want. Now below this "Def" on script that where you add the things you want your script to do. Code 3 will have an sample of it.

end
end


Code 3:
This is just an example of script data base:

The End!
<yes i know there is three threads of this same subject "blame ULMF BUGs"> XD
 
Last edited:

Pervy

Dances with Girl-Cocks
RP Moderator
Joined
Jan 21, 2016
Messages
6,356
Reputation score
2,713
Re: RPG Maker VX Ace Script calling:

Or, alternatively, you could simply have the common event call the script code, including whatever function you need, but many ways to rome and all that.

IDK what would happen if its set to other party members never really got into this much...
Script error crash on startup for invalid id.

Also, didn't realize this was the rpgmaker dev forums, but rock on.
 
OP
Frostleaf

Frostleaf

Demon Girl
Joined
Jun 1, 2015
Messages
112
Reputation score
69
Re: RPG Maker VX Ace Script calling:

Or, alternatively, you could simply have the common event call the script code, including whatever function you need, but many ways to rome and all that.



Script error crash on startup for invalid id.

Also, didn't realize this was the rpgmaker dev forums, but rock on.
This but RPG Maker VX Ace haves some kind of a limit to how big it can be in "Common Event Script" insert can be so this is why I made this post for those who want to expand the script by unlimited line usage... (◕‿‿◕) Also pervy do not use the example script in raw format... The command "\\V[81] " is refering to a variable number in the variable list... Is why it would be crashing... Also you'll need something in the game to press to bring it up to...
 
Last edited:
Top