RPG Maker MV

RPG Maker MV

Common Event Scripting Help
I have this item that I want to have a random effect, which is to give the entire party either a regenerative state for health, magic, or TP, or add a buff for Attack+M.Attack or Defense+M.Defense. As it is now, the item is currently using a Common Event to randomly decide which effect to give which works fine for the states, but I'm having trouble adding the Buff effects. At the moment to make it work I'm using a Force Action to make an actor use an "attack" that applies the buffs, but I'm not entirely certain how to check for the user specifically so the actor in the first slot is casting it which looks strange to me.

TLDR I'd like to know one or both of the following:

  1. What's the script coding to apply Buffs from Common Events, if there is one?
  2. Is there a plugin or method to check who's using the item so that they are the one casting the skill that applies the buffs?
Dernière modification de Copy; 10 juil. 2017 à 1h19
< >
Affichage des commentaires 1 à 3 sur 3
If you have the target in a target variable, I think it'd be:
target.addBuff(paramId, turns);
...where:
parameter
mhp
mmp
atk
def
mat
mdf
agi
luk
paramId
0
1
2
3
4
5
6
7

So to add a 3-turn attack buff to the whole party:
for (n = 0; n < $gameParty.members().length; n++) { $gameParty.members()[n].addBuff(2, 3); }
I think that's the effect you were after? =)
Dernière modification de Caethyril; 10 juil. 2017 à 4h22
Copy 10 juil. 2017 à 16h11 
Bless your coding knowledge, this is exactly what I needed. Thank you very much~ :2016popsicle:
Happy to help! ^_^
< >
Affichage des commentaires 1 à 3 sur 3
Par page : 1530 50

Posté le 10 juil. 2017 à 1h18
Messages : 3