Are you using Ace? I don't remember if VX had key items or not. Might be an idea to put the engine you're using into your profile.
And, ewww, I wouldn't put it into Game_Event.start - that means EVERY event is going to do this when it starts - transfer events, NPCs, etc - all of them!
What exactly are you wanting to achieve, from the player's perspective?
I was just using start as an example. I curently have it check the events name and exicute the code if its name matches. Everything else in my script seems to work. I just need to be able to access item.note from a game event to check and see if the item has the note: <seed 1> where one is any number and then save that number to a variable.
I am using rpg maker vx ace
I'm still looking for help. Please help me find the right code to ask the player to pick an item and hold that item in a variable
There is a problem with helping you, because we do not und er stand what you want to achieve - you only tell us how you want to do something, not what that something is ingame.
That is why shaz asked above what you want to achieve from the players point of view, a question you didn't answer at all, you only repeated how you want to do that unknown something.
So please describe what should happen in the game, then we can tell you how to do that best.
okay... from a programmers point of view i thought i explained the code i need pretty well. but here is what i want the player to see. I want a screen to pop up when the player activates an event and have the player choose a seed to plant. when the seed is selected the event starts a count down for the plant to grow and when it is fully grown the player can harvest it. Now, don't give me all the code for that because I have most of it. I just need a bit of code for the item select screen. I tried implementing select_item_variable_id but that just return the id of the item and from what I can tell i cant access the note of an item from it's id. I need to access the item note as written in the first posts code to to determine what seed id the item has.
In that case, you don't need any script at all, you only need to make all seeds as key items and use the event command "select key item".
That command will open a window with all key items, and store the ID of the selected item into the variable decided in the command.
Even if you can't use the event command, you should use that as an example on how to do what you want. Additionally there is a script out there (i think seither from galv or tsukihime) that modifies this command to allow regular items to be selected.
You obviously didn't read what i posted in regards to my script. What i want done can't be done in just the editor. I sugest you read the script i posted and then see if your sugestion is relevant. My script uses a timer and an array of seeds with their own variables that would take forever to enter in each seed into the event then have the event change image as it ages and have each seed change how the event responds. My script is sound it just needs a minor adjustment that i cant figure out. If you can't read code or don't know enough to answer my question, then please dont respond with unhelpful posts.
No, i didn't have time to read the code - but that is why I suggested you check the code for the event command and use that as a guide if you can't use the command directly.
There is no default way to read notetags in Ace because the notebox was never intended to be used for data transfer in the original concept. Only after the community of scripters found this to be a workaround for data assignment, in the case of MV the meta function was added there. But in Ace, nothing like that exists and you need to program any notetag reading completely yourself.
And due to the complexity of the game loop, it will be easier to implement that not AS an automatic check on all events (even on those that have nothing to do with planting), but on call from the events themselves, and split into two parts. The first part would be to get the player to select the ID of the item, and then to access the notes from that item.
For the first part it was my suggestion to use the select item command if possible or program your own with that as a guideline, for the second part there are several tutorial available on how to access the notedata and to create a regex to filter any notetags for the data you want.
I don't have the links because my main computer is down, but if I remember correctly one of those tutorials was written by fomar.
Seems like you are trying to make a Harvest Moon type game. There are scripts out there already that do this, so it might be worth grabbing some of them and seeing how they do things. I'm thinking of allowing you to decide what to plant where, the timer for it being ready to harvest, they probably also have watering/tending requirements which you may or may not want, and then showing the correct image depending on what seed was planted.
How many different types of seeds are you after?
If you have all your seeds set as key items and they are the ONLY key items you are using, then you can simply use Select Key Item and put the item number into a variable. Then you would need to run a script call to grab the details that you're after from the note. Unfortunately, this will require some regular expression magic and that's something I struggle with, which is why I haven't replied again. But if you can figure out regular expressions, you'd be able to get the info you want from the note just using a single script call after getting the item id into a variable. No entire script needed.
Self Variables might also be of use to you, as a way of recording what kind of seed is planted in each location. There are some scripts around for that - one that comes to mind is PK8's Self Data Suite.
I haven't looked at your script, but it sounds like you're trying to do the whole thing in a single script. I wouldn't do it that way - I'd break it up into 3 distinct things: selection of seed and getting of the note data (as already mentioned, you can do this using the existing command and a script call, if your items are set up in a suitable way); timer for event to harvest (I already have an extended game timers script that could be used for this); and the harvesting. You might find it easier if you try and keep those as separate, distinct ideas and design/code for them accordingly.
my timer/calendar script is separate and i would love to use a pre-made script for this but the only one i could find out on the internet doesn't do what i want it to do. i have the self variables script but it takes a bunch less work programming everything in scripts instead of filling out an event with like a hundred conditional branches and when i add pages the script from one page has a hard time interacting with scripts from another page. I have other key items other than seeds so only making key items seeds is not going to work as well as being just plain bad coding. I tried to cache all my item note tags in a separate script but i was having trouble implementing it and another user told me not to do it that way. If I should attach a variable to each item with the seed note tag and record them at start how would I go about doing that because last time I tried the code was broken.
What about planning?
If you know that in the Database the Item Ids 70 to 150 are Seeds, than when getting the selected Item ID via Script or via Select Item Eventcommand, than one just needs 2 conditional branches/if conditions:
Is VariableX equal or more 70 and is it equal or less 150?
If yes: Its a Seed.
If no: This Item is not a Seed.
Thisway you dont need a Item tag.
The Problem is if your Seed Item Ids are scattered. Than you cant solve it with an easy range condition.
EDIT:
OHOH i have no Idea how it happened that i necroposted, just realised it, please delete the Post.