I basically want a certain type of potion to only be consumed if a specific actor has been selected, I use the plugins from visustella and I also have the ConsumeEveal plugin from caethyril which adds certain conditions on the consumables, but I can't do it, does anyone have any idea?
MZ Item that can only be used by a specific actor
Javascript/Plugin SupportCan't you check the actorId as an eval ? I'm pretty sure RMMZ would allow that as well. Also you should be able to get the target's ID by putting this inside your damage formula :
$gameVariables.setValue(x, b.actorId());0
where "x" will be the ID of your variable. it'll store the ID of the actor, allowing you then to check afterwards if it's the actor you want or not.
where ";0" means that it'll always deal 0 damage.
and where "b.actorId()" use the function actorId() of the target (a = user, b = target)
$gameVariables.setValue(x, b.actorId());0
where "x" will be the ID of your variable. it'll store the ID of the actor, allowing you then to check afterwards if it's the actor you want or not.
where ";0" means that it'll always deal 0 damage.
and where "b.actorId()" use the function actorId() of the target (a = user, b = target)
Moved to: Plugin Support
I believe you can do it using VS. If that's the only reason you have the ConsumeEval plugin, it might be worth disabling/removing it just in case there's a conflict between the two.
I believe you can do it using VS. If that's the only reason you have the ConsumeEval plugin, it might be worth disabling/removing it just in case there's a conflict between the two.
It would be much easier to help you if you told us what you had tried to do, which failed. If you have VisuStella Item Core, this should be as simple as:
where X is the ID of the actor you want to be able to use it.
Code:
<JS Item Enable>
enabled=user==$gameActors.actor(X);
</JS Item Enable>
I managed to get it working like this: $gameParty.targetActor().actorId() === 60
Original thread: https://forums.rpgmakerweb.com/threads/item-that-can-only-be-used-by-a-specific-actor.143905/