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.

Items that change variables

Alan.

Member

I would like a script that allows an item to change a variable specific to the actor it was used on. For example, an item is used on Actor 1 so Variable 1 is increased by 1 or another item is used on Actor 3 so Variable 3 is decreased by 1.

Thanks in advance.
 
You do not need a script for this. You can use a Common Event. Go to your Database then Common Events. Make a new CE, then choose Variable Control. Add 1 to whatever variable you are using. Click Ok. Then click apply at the bottom of the Database.

Now go to that specific item find 'Common Event' and select the CE you just made from the Drop Down menu.

Now displaying that is a whole seperate thing.;) But uh, I hope my "Mini-Tutorials" helped you achieve that.
 
Thats basicly what he wants yes, but he wanted to change a variable based on who used it. Like he said, if hero one used the item, then his variable would change, but if Hero 2 used it, hero two's variable would change not hero ones.
 
This can still be done with a common event I believe:

Have a conditional branch with the conditional being if the actor has the weapon equipped...you can do this for every character, or only the ones that affect the variable...

Wrote this rather quickly, I hope it makes sence, I can upload a picture later if you need it
 

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