Money system and end level.

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Safaryx
$5 USD
The game ends when the player loses all their lives
  • I want something like so.

    When 'rock' is clicked, compare value 'money' greater or equal 100.

    If value 'money' greater or equal 100, subtract 100 from value 'money', move 'rock' to 'inventory'.

    If value 'money' is not greater or equal 100, go to layout #.

    In all, i want it to buy the rock and put it into the inventory, or if it can't, go to a "sorry, can't buy" screen.

    I can't seem to get the thing to compare money when clicked, which means i cant go on with the rest of it.

    Either way, this system is awesome, even easier than game maker, and i have absolutely no scripting background (that may be part of the trouble)

    Any help is appreciated!

  • http://www.mediafire.com/?e2n2zmuzqzj

    Pretty sketchy but you get the idea.

  • Thanks alot, i didn't know that you could have two "ifs" in it.

    That really helps me in general =)

    One thing though. I want a single variable 'Money' to stay constant from the game screen untill the shop screen, and still stay constant from the shop screen untill the game screen again!

    At the moment it's like this. I kill all the monsters and have 150 money, then i get moved on to the shop screen. In the shop screen I have 0 money =(

    What I tried is using my main character with a private variable in both screens so i would have that same variable, but it didn't work.

    How do i do that? And also, how do i upload my game onto these boards?

  • You can use a global variable for the money. Those carry over to all layouts. To add one, go to the "Project" tab on the right and click on your application. Then, on the left, scroll down until you see the section called "Global Variables". You can add them from there.

    And about uploading, you'll have to upoad your game off site and then link to it. I suggest Willhostforfood.com. It's free and offers direct linking to the files.

    Hope that helps.

  • Wow, that helped indeed!

    I got alot from this thread so far, multiple conditions, global variables =)

    Uhm.. sorry to ask for yet ANOTHER thing, but how in the world do you make an inventory!! One which changes the thing the person is holding (ect)

  • Will your inventory contain many items, like an RPG style inventory? Or will it be a one/two item inventory system?

    ~Sol

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It will contain many items, mostly weapons and armors.

    Also, i'm trying to make it say "your too poor" if you click on something when your money is too low, but what it does is compare value 'money' after you click on it.

    So, i'll have $150, and i buy the rock for $100, then it will say that i cant afford it (because my money is NOW $50). I only want it to say that i can't afford it if my money is too low (when i click on it)

  • ...i'm trying to make it say "your too poor" if you click on something when your money is too low...

    PLEASE! Make that "You're too poor."

  • Yeah yeah, you ARE is you're and possessive is your. You understood what I meant didn't you?

    And please don't yell the word "please".

  • lol... grammar... not my strong point at times either.

    Anyway, a multiple object inventory system is usually a tricky thing to make. I have one more question... how many types of items are you going to have in the game? Only like 10-15 items maybe? Or hundreds?

    The reason I ask is there is a really easy way to make an inventory if you are only going to have a certain amount of items.

    ~Sol

  • At least 14 different types in all, I think that the easier way will be sufficient for now, once i know how to do the basics i catch on pretty quickly.

    Edit: I should say, max number that would be in the inventory (unequipped) is five or so.

  • Sorry to bump this, but i still need advise please.

  • Sorry to bump this, but i still need advise please.

    Post an example of how you're doing it either in

     tags, or by posting your .cap.  It'll be easier for one of us to see what's going wrong.
    
    (Oh, hey... my sig is active .)
  • Hmmm it sounds like you want to have a very "Diablo" style inventory system...

    That's a little tricky... in fact, I'm not even quite sure where to start.

    One other thing... will each item take up "1 square" in the inventory, or will some items be larger than others, taking up more squares?

    All of these questions will help me figure out exactly what you are wanting to do, so I can try to come up with the best way to go about it.

    ~Sol

  • Okay, here's as much detail as i can give.

    Each item takes up one square, sort of like most RPG games, not like diablo.

    I'm going to have somewhere around 5-10 items in the inventory at max.

    It doesn't matter if it is always showing, like a bar on the bottom of the screen. I don't need it to pop up when i click something.

    All i really want is for someone to be able to click on a weapon and equip it with that click.

    Also, i need the weapon to be transferred to the inventory when you buy it from the shop.

    I really have no idea how this would be possible at all, since this is my first time every attempting to create a game.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)