- Joined
- Oct 23, 2015
- Messages
- 40
- Reaction score
- 17
- First Language
- English
Hello everyone!
I apologize if this was answered elsewhere. I did try to look! Thankfully you've all been pretty understanding in the past so I'm pretty sure that'll keep up.
Basically, I know if you use $gameVariables.setValue() you can set things to the Rpgmaker MV variables... Which is very useful! However, I'm trying to make it so say, you used an item in the menu, or an attack in battle, and it saved the ID of either the ally, or the enemy, so you could later use a common event to affect the given target. IE to see who an item was used on in the menu, or to see which enemy was targeted with a specific attack for the sake of a follow up effect. I realize both could probably be done with States, but for the sake of what I'm working on that feels like throwing in extra work to do something that should be simpler to accomplish.
I've tried using the following for the formula for items and skills, with both b.id and a.id to no success.
$game_variables.value(20); $game_variables.setValue(20,b.id);
I have some coding experience, but less javascript and I may also just not be setting things up properly, but any assistance for moving in the right direction would be greatly appreciated!
Thanks in advance!
I apologize if this was answered elsewhere. I did try to look! Thankfully you've all been pretty understanding in the past so I'm pretty sure that'll keep up.
Basically, I know if you use $gameVariables.setValue() you can set things to the Rpgmaker MV variables... Which is very useful! However, I'm trying to make it so say, you used an item in the menu, or an attack in battle, and it saved the ID of either the ally, or the enemy, so you could later use a common event to affect the given target. IE to see who an item was used on in the menu, or to see which enemy was targeted with a specific attack for the sake of a follow up effect. I realize both could probably be done with States, but for the sake of what I'm working on that feels like throwing in extra work to do something that should be simpler to accomplish.
I've tried using the following for the formula for items and skills, with both b.id and a.id to no success.
$game_variables.value(20); $game_variables.setValue(20,b.id);
I have some coding experience, but less javascript and I may also just not be setting things up properly, but any assistance for moving in the right direction would be greatly appreciated!
Thanks in advance!
