Hi everyone, I'm having trouble with setting a variable's value.
Relevant plugins I'm using: all Yanfly's Action Sequences, Skill Core, STB System
So I want to do something like the act commands in Undertale, like talking to or checking the enemy's stats.
For that effect what I did is: The act commands are skills, the skill calls a common event and in it theres a script call that sets variable 1 to the same ID in the database of the enemy targeted by the skill, then a conditional branch that checks the value of that variable and depending on it does different things.
The end result is showing different information depending on the type of enemy, only one common event needed per skill.
Except I can't manage to change the variable's value in the script call. I think I only need 1 or 2 commands but it's not working.
I know next to none about js btw
-----
Examples of what I've tried in the script call:
$gameVariables.setValue(1, $gameAction._targets[0].actorId());
and
var targetId = $gameAction._targets[0].enemyId();
$gameVariables.setValue(1, targetId);
-----
Any help? I'm not even sure if this is possible, I found a similar post to this one and they couldn't find a solution there.
Relevant plugins I'm using: all Yanfly's Action Sequences, Skill Core, STB System
So I want to do something like the act commands in Undertale, like talking to or checking the enemy's stats.
For that effect what I did is: The act commands are skills, the skill calls a common event and in it theres a script call that sets variable 1 to the same ID in the database of the enemy targeted by the skill, then a conditional branch that checks the value of that variable and depending on it does different things.
The end result is showing different information depending on the type of enemy, only one common event needed per skill.
Except I can't manage to change the variable's value in the script call. I think I only need 1 or 2 commands but it's not working.
I know next to none about js btw
-----
Examples of what I've tried in the script call:
$gameVariables.setValue(1, $gameAction._targets[0].actorId());
and
var targetId = $gameAction._targets[0].enemyId();
$gameVariables.setValue(1, targetId);
-----
Any help? I'm not even sure if this is possible, I found a similar post to this one and they couldn't find a solution there.