RPG Maker Forums

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!

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,466
Members
137,821
Latest member
Capterson
Top