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.

Need Help! Huge newb!

Z0har

Member

I just learned how to make switches, that's how new I am to RPG Maker XP...

Anyways, this will sound kinda weird since the game I'm working on is a joke game that shows me examples on how to do basic things.

In one point of the game, you can feed your cat any consumable item you want and everytime after that, when you gain one or 2 levels, come talk to it again and the cat will give you an item.

I was wondering how this can be possible, since I want the player to have the choice of picking any item in his inventory and giving it away, and then coming back later to get new items after he levels up.

Any help will be appreciated!
 
You'd normally do this with an array for each character you want to store your items if you want the same item back, however if it's gonna be any item, you'll only need a regular integer variable. If that's what you want, you have to create a variable named something like 'Cat Item Store Lvl', with the starting value of 0. Your event contains the item choice (you're best off scripting this one... or have it scripted, for that matter - let's put a regular conditional in here for now), followed by 'remove the chosen item from inventory', as well as 'set variable "Cat Item Storage Lvl" to [Actor's current level]'.
You now create a new page that has 'variable "Cat Item Storage Lvl" greater than 0', and include a conditional wheather that variable is 2 levels higher than the actor's current level. If it isn't, play like a sound effect, or whatever - if it is, return a randomly generated number for the returning of the item. Afterwards, set the value to 0 so the actor can take the chance again.

Note that this approach won't get anyone anywhere once they reach the max level.
 

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