@freebooter \N[actor id] is used to display the name of an actor, based off their id in the database. when processing these escape codes within the message window, the system compares regular expressions to find matches. this means it is impossible to specify a variable id within \N[actor id] and hope to retrieve the variable's value. instead, we will make use of \V[variable id], which is used for doing just that. instead of storing and referencing ids, we will store the actor's name itself into the variable and display it with \V[variable id].
use a conditional to determine whether a party member is the desired class:
Code:
$gameParty.members().filter(function(actor) { return actor.isClass($dataClasses[classId]) }).length > 0;
if this condition is true, store the actor's name into the variable you want, using the script option within the Control Variables command:
Code:
$gameParty.members().filter(function(actor) { return actor.isClass($dataClasses[classId]) })[0].name();
when you are ready to display the actor's name, simply place that variable's id into your message window's \V[variable id] reference.
the world keeps spinning.
