Checking who used an item

Hi, I want to check who used an item, so it can have different effects depending on who used it.
I'm not sure how to do it.
I've tried:

Conditional branch, script, $gameParty._targetActorId = Reid

This just returned an error.

How should it be done?

Thank you.
You could use "Control Variables -> Game Data -> Last -> Actor ID to Act" to store the ID of the user in a variable (or "Target Actor ID" for the target). Then check that using Conditional Branch -> Variable. 👋
It sounds like simply using the event command is the easiest way for you. As for what you tried:

Conditional branch, script, $gameParty._targetActorId = Reid
There are three things wrong with this.
1 - Typing = makes things equal. X = 5. To ask if things are already equal, it's two ==

2 - Just typing a word refers to a built-in JavaScript command, a function, or a variable. So your game is going to look for a variable named Reid and there isn't one. If you were checking something to be equal to the name Reid, that goes in quotations to make it a string of characters: "Reid". However:

3 - The code portion is pretty clearly returning an ID (it says targetActorId). So you should be checking it against the ID of the actor as listed in your database - e.g. 1.

But generally speaking, it's best to do as much as you can using the included event commands. If you need to break out some actual code, try to get complete, written-out segments, or consider doing some JavaScript tutorials to get the basic syntax.
Thanks guys. You solved my problem!

Original thread: https://forums.rpgmakerweb.com/threads/checking-who-used-an-item.160935/