dcsimg
Results 1 to 4 of 4
  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2017
    Posts
    1

    Need urgent help with scoring system

    Hey! So I have an assignment in school and there's one bit I really want to add to my program but I have got no idea how. Basically its a Choose Your Own Adventure game and it's meant to be a normal day but you choose how your day goes. the 'score' starts at 100 but it will be 'behind the scenes' and if you (for example) burn your toast or something or spill your coffee, it takes off 20 or 10, and by the end of the game it tells you if you day went Bad(60-80), Alright(81-90), or Great (91-100). So at the end it will say "YOUR DAY WENT BAD/ALRIGHT/GREAT" related to your score, so when you click the button to make your toast and that decision burns your toast then it takes off 10 'points'. Does that make sense? I hope it does! Anyway, thanks in advance!

    -Woven

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    32,154

    Re: Need urgent help with scoring system

    Sure, it makes sense, but if burning your toast is enough to drop your day from Great to Alright....well, you may have other problems.

    This sounds like essentially a series of questions that you ask the user, and as a result of each answer, it adds/subtracts the score. It also sounds like you might branch to other questions depending on the earlier answers, though you didn't explicitly say that. The easiest way to add something like that is to have a label with the question, and a series of radiobuttons for the answers. You fill the label with the question, fill each of the radio button texts with each answer (hiding any radio buttons that don't have answers associated with them), and let the user select one, then take action from there.
    My usual boring signature: Nothing

  3. #3
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    4,298

    Re: Need urgent help with scoring system

    To me, it sounds like you need to learn about the Rnd function. That's an easy way to interject a random component into things. Also, it would seem that you need to "force" the user/player to take a certain number of actions. Also, I'd possibly have things that could increase (as well as decrease) happiness.

    You also need to just create some global variable that tracks your score.

    Also, the timer control may be useful (possibly combined with Rnd). Maybe, as you're playing, certain things can happen out of the blue (even though you haven't clicked a button). Just some spit-balling ideas.

    This is all pretty easy stuff, but you need to give us an idea of what level you're at. And also, more brass-tack details about what you're actually trying to do. VB6 may be a RAD (Rapid application development) language, but you still need to tell the computer the precise steps it needs to take. A specification like "I want a 'how was your day' game" just doesn't really do it.

    Also, I think you'll find that most here are willing to help you solve specific problems, but they're not willing to just "do" your homework for you. Although, I'm not saying that that's what you asked for. Just saying.

    Best of luck with it,
    Elroy
    Any software I post in these forums written by me is provided “AS IS” without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. Please understand that I’ve been programming since the mid-1970s and still have some of that code. My contemporary VB6 project is approaching 1,000 modules. In addition, I have a “VB6 random code folder” that is overflowing. I’ve been at this long enough to truly not know with absolute certainty from whence every single line of my code has come, with much of it coming from programmers under my employ who signed intellectual property transfers. I have not deliberately attempted to remove any licenses and/or attributions from any software. If someone finds that I have inadvertently done so, I sincerely apologize, and, upon notice and reasonable proof, will re-attach those licenses and/or attributions. To all, peace and happiness.

  4. #4
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    6,442

    Re: Need urgent help with scoring system

    SimpleExample.zip

    And, like most others, I don't like doing homework myself, say nothing about someone else's (of course I haven't been in public school for over 43 years!!!!). But, attached is a very, very, very (did I say very?) simple example of some questioning using a global variable to track it. It does not even pretend to do all the stuff your teacher expects (like that good suggestion above about randomizing), nor does it come even close to doing your homework, but it might give you some ideas.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width


×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.