Hi everyone! For some things, I had thought that, using the answer selector, one of them would need to have certain objects.
By example:
Someone asks you for 10 wood. And in the options you put:
-Deliver wood
-Better not
And that when selecting "deliver wood" if you do not have 10 wood in inventory, the npc tells you that you do not have enough, and that when you have 10 or more, accept them and continue the event.
Is it possible with variables? I looked with plugins but only found one of skills.
Thank you!
It looks okay to me. What scenario are you testing, and what is the result? Do you have 10 wood in inventory at the time?
Can you explain in more detail what you are doing, what you expect to happen, and what is happening? I can't see what you're doing, so I can't troubleshoot. And I can't see if it's working properly, but just not giving the results you expect because it wasn't set up that way.
Here are some suggestions - change the messages so they say different things. That will show you which message it is falling through to.
If you choose Deliver Wood and you have 10 wood and it gives the "Don't have it" message, go into debug (F9) and see what is in variable 6. Or right after the Control Variables command, add a Show Text command with \v[6] so it will tell you what is in that variable.
Finally, post a screenshot showing what plugins you have, just in case one of those might be interfering with the variable or the choices.
experience shows that there are exactly three possible causes when something like this happens:
1) the event doesn't work because you mixed up the event properties, especially page conditions.
we can't check that because you gave us an incomplete event screenshot - the contents are only half of the event, the rest of the event window is also important and can cause problems.
2) a plugin changes the variable values because you forgot to configure it.
Whenever you add a plugin, you have to configure it before doing anything else (even adding another plugin). That is for many reasons, and if you do not understand any configuration setting then you should learn about it before continuing.
In this case, a good number of plugins use variables to communicate with events. If you do not configure those variables and reserve them by naming them, you risk using the same variable for something else - and then it becomes difficult to sort out what is changing the variable value.
3) you choose the wrong item.
Don't laugh, but it has happened before when a user had two items with the same name and selected the wrong one to get an inventory count.
Final tip:
Instead of writing "I don't have it", write "I only have \v[6] wood" in the show text.
That will tell both you and the player how many wood they have in that moment, making both playing and bughunting easier.
Are you sure you have the same "wood" in inventory and check the same wood? Also, the same with variable. Are you sure you're checking "Counter" variable nr 6? Make that sure.
By inventory, you mean backpack while playing the game, right? (if you are playing, press ESC to enter menu, then check "Inventory" - do you have wood items there?)
But are you sure you have only one item in item database (F5 in Editor, then check "Items" tab)?
If you click "Control Variables", you need to select "Game Data" from the list, then you can specify what data you want assign to that variable -> you need to select that "Wood" items (the same that you've got in backpack ingame).
No, I only have one wood there. And I do not understand. And I don't understand: "If you click" Control Variables ", you need to select" Game Data "from the list, then you can specify what data you want to assign to that variable"
How do I assign that?
OK! Finally.
I had not understood Game Data, I confused it with something else because I have the program in Spanish and I got mixed up with the names.
There, it works perfectly. Thank you all!