Jump to content
Sign in to follow this  
Rabbit32

Need help with a buying script

Recommended Posts

So I am in the middle of making game and am trying to look for a buying script for my game so I Will give an example
You have $500 and there is a door that costs 500 when you try to open it and you dont have the money it will stay locked but if u do have the money it will despawn the door and take away $500 am not sure if this is possible but if you can explain that would be good :D not a lot of tutorials online which is annoying but I am trying to get better at scripting thanks

Share this post


Link to post
Share on other sites
2 hours ago, mid endian said:

Think you'd have to dig through an array of player inventory that adds up the gold total. 

Not necessarily.  Something like that could be managed with logic.  They could have a dollar amount just as easily as tracking a score value.

For my 2 cents, the first questions would be these:

1.  Does it need to allow for multiple players each having their own amount?

2.  Where does the money come from?  Are they selling items to NPCs, finding it, or maybe earning it by performing tasks or quests?

There are a lot of different things that would affect how it's put together.  Really depends on the style of gameplay you want.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×