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.

weapon stealing problem

I have a problem with being able to take off a equiped item
im useing varibles in this problem which i have set up perfectly

its just when i grab a item off the shelf and equiped it and then try to pay for it without having the right amount of money. the store clerk will take the item away from me and put it on the shelf again.

but because i have it equiped it does not take it away.. but yet it does show that it took the item, but if i look in the menu i have it equiped and which im able to leave the store without getting the cops on me

which is crap...

GLitch
 

Jason

Awesome Bro

Uhh it'd make more sense to do something like this;

Code:
 

Conditional Branch: If Item [Fishing Rod] is in inventory

   Conditional Branch: If Gold is 100 or more

      Text: Thankyou for shopping at Fishermans tackle !

      Change Gold: -100

      Change Item: Fishing Rod -1

      Change Weapon: Fishing Rod +1

 

      Else

      Text: Please come back with more money, I'll put this back on the shelf for you.

      Change Item: Fishing Rod -1

   Branch End

Branch End

 

Try putting that into an event and see what happens, should do the trick, although if the variable is a MUST (Although you don't really specify what it's used for), then you can add that in the Else handler.

Hope that heped.

PS. This means that you can't equip the fishing rod until you've bought it, which if you ask me, seems more logical, lol.
 

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