Discussion in 'JS Plugin Releases (RMMV)' started by mjshi, Jun 18, 2016.
@mishakoc You're very welcome, I'm happy it's been useful c:
Hi, sorry if this is necroposting.
I've read through the helpfile multiple times, but I don't know if I'm missing it or not.
I was wondering if there is a way to check if the value of a given variable is greater than the values of multiple other variables.
For example, if variable1= 10, is there a way to make it so that the result only happens if variable1's value (10) is greater than the values of variables 2, 3, or 4?
Sorry if I'm not being clear, or if it has already been described. So far, I'm only able to see that it can check if the variable is a constant value. The traditional editor lets you compare only one variable's value to the variable in question, but not multiple.
Thanks, and sorry again if it is unclear, or goes against rules.
No, no, not necroposting at all. It's a pretty quick add (currently writing it now), but I couldn't think of a better name than Check.vgreater(....). Any suggestions on what the function should be called?
I think Check.vgreater(....) is good. I'm no coder at all, but as long as it allows to compare one variable to multiple other ones at the same time (rather than doing it 1 by 1 or only by a constant value). I figured out a way to do it with default editor, but it is pain and makes wall of text. Thanks for the response. I'll look forward to seeing the new function added.
It has been done.
- Added Check.vgreater and Check.vlesser
See the github link in the main post or below for the new version.
@mjshi Thanks so much! Is there a patreon for you that I can donate? I don't have much, but I'd like to show my gratitude.
@w.alexander Aww, you're welcome! That's very kind of you, there's no need for it at all but I really do appreciate the gesture c:
I don't have a Patreon (yet...), but if you like, you can send donations via my PayPal. I usually don't make the link super public (because identity scraping bots are a force to be reckoned with) but I've sent the link to you privately in PM if you decide you really wanna send something my way ;p
Awe yea this is perfect for a crafting system I was making. I originally did it through the player loses x items and gains x skill. problem is I think that can put the player into the negative. So this should be a more efficient way to run the check.
Hi, thanks for this plugin! I've tried to replace the more convoluted coding I did, but I must have made a mistake.
Can 'Check.in_range' be used to see if one variable is between two values/numbers? If not, how would I handle that? Do I simply have to create another variable and set it to change both variables at the same time?
(I tried using 'Check.any_inrange' with the variable I need and an extra one set to a number that would never be between the values checked, but I had the same result, the event didn't function.)
If this normally works I made a mistake somewhere else (unrelated to your script), so I haven't posted the rest of the 'code' yet. This is probably it, but I thought I'd check.
Does combining Check.greater and Check.lesser work for you? Ex. Check.greater(1, 5) && Check.lesser(1, 10) to check if 5 <= variable 1 <= 10.
Otherwise, I'll investigate to see if this is an issue as soon as I'm free.
(edit: also, make sure you're getting this from github and not dropbox! dropbox may be a little outdated.)
Sorry, it took a while, but I've finally gotten the chance to correct things! Everything is in working order. And it's so much easier to deal with this without all the nesting. Your plugin is brilliant! I can't thank you enough!
@mjshi Hey, would it be possible to mod this plugin to check other inconvenient-to-get hidden variables like player direction and x or y coordinates?
@Benevolentwanderer Sure, go ahead if you'd like! Feel free to contribute, or submit pull requests to GitHub.
Those shouldn't be too hard to add, I just don't have the time at the moment to add them.
Separate names with a comma.