Hey guys! I'm trying to use the YEP.2 - Message Core plugin to display a number a variable is holding.
The plugin is ON and its other functions seem to be working just fine.
I only have one variable in my game, it's "number of corn cobs".
I am using \v[1] command.
The corn cobs are getting collected properly.
Their number increases in the menu properly.
The event with "If: Number of corn cobs = 10" works properly as well!
Yet, the \v[1] gives me "0" as value every single time! Anyone else had this problem? Any known solutions?
either you broke the plugin somehow, or you did something wrong in the event.
Can you please provide a screenshot of the event and a screenshot of your plugin manager (most mistakes with plugins can be checked there)?
Your first command makes variable 1 how many cobs you have before giving you one. If you're starting with zero that would explain this.
But you say it's increasing properly?
Try changing the variable to "add 1" condition and see if your message shows correctly then.
// move the option you have under the give item
Yeah, but right after that I am gaining 1 corn cob so 0+1=1, right?
In the meantime I found a solution that I don't find too elegant. Changed the top line of the event to:
Control Variables: #0001 Number of corn cobs += 1
Which proves the problem isn't in the plugin (yay!) but rather in how my variable doesn't really give a damn about the number it is referring to.
The number at the start of the script is 0.
You then add one to the item, but that doesn't add one to the variable automatically. >< that's why you are having to add 1 each time.
The order is important.
Oh, I see. So the "Control variables" is a command to check the variable at that exact moment and without the check, the \v[1] command won't automatically read the value, it will gather it from the last performed check.
Gotcha. Thank you all 🙂
It's not a check, it sets the variable to the value it detects at that moment, but other than that you got it correct now.