Storing user and target information in variables using skill formula can be done this way:
Code:
$game_variables[USER] = a; $game_variables[TARGET] = [] unless $game_variables[TARGET].is_a?(Array); $game_variables[TARGET] << b; 0
The 0 in the end is to ensure that your dummy skill deals no damage/healing.
In your event you should use the following script call:
Code:
$game_variables[TARGET].length.times do
b = $game_variables[TARGET].pop
next if (b.dead?) # skip if target is already dead
i = 0
# I am not too sure about this part
SceneManager.scene.all_battle_members.each.with_index do |battler, index|
if battler == b
i = index
break
end
end
$game_variables[USER].force_action(skill_id, i) # see note
end
NOTE:
I am not too sure about the part that gets the target index because I do not remember if you have to pass a target index or a target to the force_action method. If you have to pass an index, it should work that way. I am not too sure if you need the enemy index in the troop array or if you need its index in the all_battle_members array, but that should be changed easily and it is easy to verify. If you have to pass the target instead of its index, you can just change the line with the "see note" comment into this:
Code:
$game_variables[USER].force_action(skill_id, b)
If this is the case you can completely remove everything from i = 0 to that line (except for that line, of course).
I would check this myself, but I am currently unable to access the engine and I have to rely on my memory. I hope this helps you.