Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Help with item selection

I posted a request for a script like this in requests, but then I thought, if I asked someone to help me script it, would learn as I went along!

Basically, I need help with putting together the whole of a script, as I know nothing about rgss. I tried making my own script once, but it just kept crashing my game. Plese help me!

So, I'd like the script to go something along the lines of:

Text: I'd like to help you whenever possible.
A window then pops up, very similar to the onewhere your items are shown in your invetory. If switch 1 is on, then a Potion is in the menu. When the Potion is clicked on, it leaves that menu and goes to your invetory.

Please may someone also show me how to add other items that depend on other switches being on.

Please help me out, as I really want to learn how to script!

Thanks in advance

Micklo
 
Its a bit complicated to say what the script is for but...

There is a menu that pops up when you talk to a lady.
It is normaly blank.
If switch so and so is on, then a certain item will be on her list.
If this item is selected, it will disappear from her list and appear in your invetory.

It's sort of a reward system.
 
I see.

What I would do, is not use game switches, but instead, just make a special $game_rewards class that allows you to simply add items id numbers into it.

Then, in your window, when you make your data list of items, just check for item_id numbers in that list, and if they are, add them to the data in the window (as it does in window item, you just add a new filter).

On your window selection, once you select an item, you can quickly retieve the item id from the window and easily use the $game_party.gain_item syntax to gain the item.

If you would like to do this over msn messenger (would be easier), I will stay up a bit later and we can go through the system.

Otherwise, I can just go through the process details here.
 
What I would do, is not use game switches, but instead, just make a special $game_rewards class that allows you to simply add items id numbers into it.

Then, in your window, when you make your data list of items, just check for item_id numbers in that list, and if they are, add them to the data in the window (as it does in window item, you just add a new filter).

On your window selection, once you select an item, you can quickly retieve the item id from the window and easily use the $game_party.gain_item syntax to gain the item.
Seph, I think he actually meant in english...

Well, basically, you need to create a custom selectable window (sharktooth/Mr.mo has a pretty nice tut, check the tutorial section), that write item's name based on a switch or something. Then you need the scene that activated when you talk to the lady and to select it. Try writing the item name without switch thingy first there, Window_Item is a great reference.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top