checking players stats

Long story short - I want an event to be able to check if a players luck is over 10 using an if statement.

Will also accept a way to set the party leaders luck to a variable. I found "$gameParty.leader().level" which works for level but changing it to "$gameParty.leader().luck" isn't working.
its luk
Long story short - I want an event to be able to check if a players luck is over 10 using an if statement.

Will also accept a way to set the party leaders luck to a variable. I found "$gameParty.leader().level" which works for level but changing it to "$gameParty.leader().luck" isn't working.

Code:
if ($gameActors._data[1].luk===?){
 //Do this....
}
set the ? with your valur , for stric more than >10

Code:
if ($gameActors._data[1].luk>10){
 //Do this....
}
_data[1] === player 1
_data[2] === player 2
_data[...] === player ....
why using a script line at all if it is in an event?
The regular method for this is to use control variable (with the game data option) to load the parameter of the actor you want, then check it with a conditional branch.
why using a script line at all if it is in an event?
The regular method for this is to use control variable (with the game data option) to load the parameter of the actor you want, then check it with a conditional branch.
lol why using the regular method ?
In addition, this will allow him to learn a little more JavaScript.

Thank you for the long story short answer. Probably shouldn't be trying to write javascript at 3am after a full work day lol.
I went with - "Control Variables:#0005 Player Attribute = $gameParty.leader().luk" and its working great.

why using a script line at all if it is in an event?
The regular method for this is to use control variable (with the game data option) to load the parameter of the actor you want, then check it with a conditional branch.

I'm curious how this works as I've poked around a bit with it and am not sure of the method required. If I set a variable == game data party member 1 how do I test for his luck stat without code in the conditional branch?
You load the luk value of an actor into the variable by using the control variable command, and then check the value of the variable in the regular conditional branch.
You don't need code for this, because you don't use the script line options of either command.
In the case of the control variable command you use the game data option instead of the scriptline option, and in case of the conditional branch just check the variable against whatever number you want to check.
You load the luk value of an actor into the variable by using the control variable command, and then check the value of the variable in the regular conditional branch.
You don't need code for this, because you don't use the script line options of either command.
In the case of the control variable command you use the game data option instead of the scriptline option, and in case of the conditional branch just check the variable against whatever number you want to check.
Finally figured it out. So many sub menus full of options starts to obscure things. Thanks for the help everyone.

Original thread: https://forums.rpgmakerweb.com/threads/checking-players-stats.76029/