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.

A few Eventing questions

Star

Sponsor

Is there a way to prevent use of an item by events?  Let's say I have a healing item that recovers HP, but my character already has full HP, I can still use the item even tho my character has full HP, but I want to be able to prevent the player from wasting items by stoping them from being able to use an item if the character has full HP.

Also, I'm using a ABS script and when I reach a certain levels I learn Skills.  Is there a way to show a common event that runs when the skill is learned?
 
Well, for the healing item issue, you could make the item run a common event instead of just heal, and the common event would be something like--
-Variable Operation: Change Variable 001 to Player's HP
-Variable Operation: Change Variable 002 to Player's Max HP
-Conditional Branch: Variable 001 = Variable 002
--Play SE: (Some negative SE)
--Show Message: "Player's HP is Full."
-Else
--Change Hero HP: +#(How much HP you want Hero to gain)
You would have to make a common event for each healing item, however.
 

Star

Sponsor

It works in theory for a game that has one character.  or a game that has more than one character with items that heal everybody at once. 

Because you can't check which character they are selecting.  They could be selecting my second character to heal, but since my first character's HP is full, it won't let them heal him
 

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