Item Can Only be Consumed by Specific Actors?

Hello.
I'm trying to make an item that can only be consumed by a specific actor.
There are scripts like Hime's Custom Use Conditions which allows you to have conditions for USING the item, but that's not what I need.
I need it to be used by anyone, but consumed by one. (IE, it doesn't matter who gives it to said character, only the specific character can actually drink it it).
Basically, I've got an alcoholic character who drinks booze, but I only want him to be able to because the other characters are minors.
In my searches, I've been unable to find anything like this.
Basically you're looking for a custom target?
I don't know how many scripts out there that deal with a custom target though.

Have you tried to search Target Manager or with a similar keyword?
Make the item call a common event, use the common event to apply whatever effect you want to the specific actor you wanted the effect on?
I think the condition might look like this in RGSS...

Code:
if item.id == ITEM_ID and self.is_a?(Game_Actor) and self.id == HERO_ID
# More code here
end

You could add those lines inside the method that determines there's an item to be consumed. Or you might need to replace self with something else like get_character(0) if you use it as a script call event command.

By the way, the "and self.is_a?(Game_Actor)" conditional statement can be omitted if you're completely sure enemies won't ever use that item.
As this most likely requires scripting, I am moving this thread to RGSS3 Script Requests.

You should use Hime's Scope Conditions script. Set the item's Scope to All Allies, but check for the battler's name as the condition - I think that's
<scope condition: b.name == DrunkyMcDrunkface />

That way it will only affect Drunky.
As this most likely requires scripting, I am moving this thread to RGSS3 Script Requests.

You should use Hime's Scope Conditions script. Set the item's Scope to All Allies, but check for the battler's name as the condition - I think that's
<scope condition: b.name == DrunkyMcDrunkface />

That way it will only affect Drunky.
This one "works", but not exactly.
It still allows you to give the item to anyone, it just only actually works on the intended character, with no indication to the player that it didn't work on the other characters. Also the script seems intended for battle use, as it only allows you to use it once in the overworld. It seems like there's no simple way around this without custom scripting. Oh well.
Well, I once made a script named GiveAway XP but I don't recall if I've ever ported it to ACE...
It lets you give items to NPC's and get some points in return or lose them. If that's not the kind of script you're looking for, well, I'd be out of ideas then. XD
This one "works", but not exactly.
It still allows you to give the item to anyone, it just only actually works on the intended character, with no indication to the player that it didn't work on the other characters.
If the Item's Scope is "All Allies", I don't think the game should be having you pick a target at all, unless you have some other script messing up the default targeting process.

Also the script seems intended for battle use, as it only allows you to use it once in the overworld. It seems like there's no simple way around this without custom scripting. Oh well.
It's possible this script was designed mainly for battle. But what you describe makes me think that maybe you have a Common Event on the item? If that's the case, the "can only use it once" has nothing to do with this script - it's because you have a Common Event on the item and CE's can only run on the Map scene, not a Menu scene.
@Tsukihime Should your Scope Conditions script work okay for "All Allies" items outside of battle?
@Wavelength I looked at the script. It adds extra rules to whether the item can be used on a target, which affects target selection.

If it tests that it's unusable, the game shouldn't use it.

However, for "all allies", the skill I believe is considered usable if any ally can use it.

If only one actor can be selected I would use "one ally"

Original thread: https://forums.rpgmakerweb.com/threads/item-can-only-be-consumed-by-specific-actors.124918/