Hello! I would like to be able to make, for example, an event that requires the Hero to have 10 Slime to be able to trade them for a potion.
My problem is when I use the "Conditional Branch" and set it to "Item in inventory", it only check if you have 1 of the item...
I don't know if you guys understand my problem but if so is there a way to make that kind of event without scripts?
Simple Trading Sequence
● ARCHIVED · READ-ONLY
-
-
you need a two command sequence
1) control variable : game data : item in inventory
This will get the number of items you have of that type at that moment stored into the variable
2) conditional branch variable >= 10
this would test if the number is greater than 10
Please follow the link in my signature and look for the "variables Guide" there, it will teach you how to do these and other quests that require counting or variables -
Hmmm...
I'm trying to put the variable [0001:YellowSlimesCount=Yellow Slime] and I'm getting this error message
Script 'Game_Interpreter' Line 750: NoMethodError occured.
undefined method `[ ]' for nil:NilClass
Any idea of what I'm doing wrong? Cause basicly I just run an event with "Control Variable" before adding a branch that require this variable.
-----------------------------------------------------------------------------------------------------------------------
Variable
[o] Single [0001:YellowSlimesCount]
[ ] Branch
Operation
[o] Set [ ] Add [ ] Sub [ ] Mul [ ] Div [ ] Mod
Operand
[ ] Constant
[ ] Variable
[ ] Random
[o] Item [001:Yellow Slime] In Inventory
[ ] Actor
[ ] Enemy
[ ] Character
[ ] Other
------------------------------------------------------------------------------------------------------------------------ -
It's better to take a screenshot of your event than to try and type it out. And include the entire event window, not just the list of commands.
If that's the error you're getting, it's not caused by this event. I wonder if you're running a script that's causing the issue? Do you HAVE slimes in inventory at the moment?
I just noticed you've posted in the VX forum. You're using VX, and not VX Ace? I have a feeling there MAY be a bug in VX to do with inventory or with variables ... maybe search around this forum for posts by others needing help with setting variables?
And for your reference:
How to take a Screenshot:
You've heard people say to take a screenshot, but how does one take a screenshot of their game? Simple, while the game is running, hit the Prt Scr button on your keyboard, which is located right next to your F12 key. If you're using a laptop, you might have to use the Fn key in combination with the Prt Scr key to get it to work.
Now that you've pressed the button, it's time to paste this screenshot into an image editing software. If you don't have anything fancy such as Adobe Photoshop, GIMP or Paint.NET, no worries; you can use MS Paint instead. Open up your image editing software, create a new file, and then hit ctrl+v on your keyboard, or simply right click on the screen and select paste. This should instantly paste the screenshot into your image editing software. You can go ahead and crop the image to suit your needs, or if you don't even know what that means, you can just upload it as it is.
Save the image as a PNG, or if you really need to, as a high quality JPG.
How to upload the image to the forums
Now that you have you have an image on your computer you'd like to show us, how can you get it to show up on the forums? Firstly, you need to find an image hosting site, photobucket.com or imageshack.us are popular ones. If you have another image uploading website, great - use that one! Either way, upload it to the site, and then get the direct link. Don't get the resized link, or the thumbnail link, but the direct URL. You'll know you have the direct URL if the URL ends with the file extension you saved your image in (which will hopefully be .png).
Once you have this direct URL to your image, simply use the IMG tags in your forum post and paste the URL in between them. If this image is big, please leave the image in spoiler tags.
IMG tags:

Edit: Yeah, I knew something like this was around:
http://forums.rpgmakerweb.com/index.php?/topic/32-game-interpreter-fix/ -
No I have no Slimes in my inventory when I apply the variable
-
Did you follow the link at the bottom of my post?
-
Yes I did and now it works :D Thanks alot, I don't think I could have found that on my own :XDid you follow the link at the bottom of my post?
And I know how to take/post screenshots, I just like to write alot XD -
The problem with writing descriptions on bughunts is that in most cases, the error is at a place where you don't think to look at, and that means you also don't think to describe it. Add to that the possibility of typos (there are cases where a missing space created the bug), and you'll see why we are asking for screenshots instead of a description: we can see everything on the screenshots, even things that you don't know could be important...And I know how to take/post screenshots, I just like to write alot XD
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.