example: you have an actual quest journal item and when used you run a quest journal plugin
how to open/use a script when using an item
RPG Maker MV SupportHave you tried setting up a common event for the item you're using? Then just have that event run the script or plugin command you need.
ive tried but failed
What exactly are you trying to do or what do you want to happen in the game for the player?
That explanation and screenshots of what you tried that failed will probably make it easier for folks to offer help.
That explanation and screenshots of what you tried that failed will probably make it easier for folks to offer help.
ive already deleted the failed scripts so theres that
what im trying to do is when you use/consume an item it runs a plugin/script
what im trying to do is when you use/consume an item it runs a plugin/script
Not to be a stickler here, but we definitely need more info than that, because calling a common event that then uses a script or plugin command does work... Are you using a script or a plugin? If it's a plugin, what plugin are you using? You need to be as detailed as possible when you post questions, because I'm pretty sure I'm the only mind reader here, and I only offer that service for a fee 😉
Maybe the script you're using is the problem?
Maybe it's how it's called in the common event?
Maybe it's not being called by the item?
Maybe it's the plugin?
There are a lot of things I don't know that are stopping me from helping you.
Maybe the script you're using is the problem?
Maybe it's how it's called in the common event?
Maybe it's not being called by the item?
Maybe it's the plugin?
There are a lot of things I don't know that are stopping me from helping you.
Yeah, without knowing what you did that didn't work, any answers we give are going to be extremely simple.
- In the item's Effects, select a Common Event
- In that Common Event, enter either the plugin command or script call
So if that doesn't work, you'll need to give more information about what command you're using, what you want it to achieve, and exactly what's happening instead.
thank you!
like above said... set common event to execute when using the item
then in the common event you can use plugin command / script call...
be wary though... some plugin command / script call might be only available inside Scene_Map
and executing it inside Scene_Item might not work properly...
so to fix that issue... in your common event you might want to script call to back to Scene_Map first before calling the plugin command / script call...
in MV i think it's
Script:
hope this help
then in the common event you can use plugin command / script call...
be wary though... some plugin command / script call might be only available inside Scene_Map
and executing it inside Scene_Item might not work properly...
so to fix that issue... in your common event you might want to script call to back to Scene_Map first before calling the plugin command / script call...
in MV i think it's
Script:
Code:
SceneManager.goto(Scene_Map)
hope this help
Original thread: https://forums.rpgmakerweb.com/threads/how-to-open-use-a-script-when-using-an-item.146125/