- Joined
- Apr 6, 2012
- Messages
- 72
- Reaction score
- 14
- First Language
- English
- Primarily Uses
EDIT: no longer necessary
Last edited:
<Custom Apply Effect>
console.log('Variable 4 is' + $gameVariables.value(4));
$gameVariables.setValue(4, $gameVariables.value(4) + 10);
console.log('Variable 4 is' + $gameVariables.value(4));
</Custom Apply Effect>
Did you retype that, or did you copy/paste? If you retyped it, could you please grab a screenshot showing the tag in the editor? Just in case there's a typo in the tag that you didn't redo when you typed it manually into the forum.<Custom Apply Effect>
$gameVariables.setValue(4, $gameVariables.value(4) + 10);
</Custom Apply Effect>
The improvised weapon box works. When I increase the value with an event, it increases, and it's shown in the menu. When I do it through this notetag, nothing.I don't see anything wrong with your code necessarily. So this could be two (or more) possibilities.
1.)
Does the "Improvised Weapons" menu box actually work?
If you increase Variable #4 in the variables menu (press F9 during playtest to open variables menu), does it show correctly in the menu?
2.)
Does the "Custom Apply Effect" actually run? You can check it with some crude debugging.
When the state is applied to the actor, open the console by pressing F8 and look at the results.Code:<Custom Apply Effect> console.log('Variable 4 is' + $gameVariables.value(4)); $gameVariables.setValue(4, $gameVariables.value(4) + 10); console.log('Variable 4 is' + $gameVariables.value(4)); </Custom Apply Effect>
Yeah, that's what I've been saying all along! It makes so sense.If you added those console.log commands to the note tag, and the state has been applied to your actor, before taking that screenshot of the console log, then it means the contents of the note are not even being executed.
I certainly hope so!Are your Yanfly plugins all in order?
Ah, I was afraid of that.I think the <Custom Apply Effect> will not work if you add your state to your actor by using Auto Passive State. That should be the reason why your variable is not changed.
then you hope wrong - your plugin order is completely wrong.I certainly hope so!
