Consulting

Results 1 to 4 of 4

Thread: powerpoint game life tracker

  1. #1

    Question powerpoint game life tracker

    hey guys, so im working on a project for school that uses powerpoint in a way other than just for presentations. i decided to go with a game approach. if you are familiar with the idiot test game, my project is similar to that. to finalize my project and make it stand out id like to incorporate a 3 lives counter. i have a total of 36 slides with 4 checkpoints throughout the game. On each slide the user has to make the right choice to answer the question or complete the objective. each time the user picks the wrong choice the macro will get triggered and and decrement the counter from 3 and then change the current slide to the default "sorry you are wrong" slide. i have no clue how to do this. im new to VB so take it easy on me. i know i currently have the number of lives displaying in a message box but in the final copy id like it to be put into each slide and then on game over send it to a different slide.

    Objectives:
    • incorporate lives(counter) into presentation
    • redirect to appropriate checkpoint slide
    • redirect to game over slide when all 3 lives have been used


    macro ex game.jpg

    this is all the code i have but it isnt working. i know the code isnt exactly what i want to do but i followed another site to get this far and this code was the only thing to get remotely close to what i wanted to do. My professor isnt familiar with how it can work but is willing to boost my grade if i can get it working. I am using powerpoint 2010 on my personal computer and 2007 at school.

    thank you all for your help in advance.

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,704
    Location
    Tony,

    Welcome to VBA Express. If you've read the Forum FAQ, you'll know that we don't DO homework, but we love to help with it.

    Any time that you are coding, you must have an algorithm before you start, even if it is only in your head. An algorithm is merely a road map of what your code will do and it often looks and reads like code and even uses lots of code Keywords.

    A sample of what your algorithm might look like is
    Sub On Slide Click
    If Answer = True Then
    'Hmm. Need list of correct Answers
    Show Next slide
    Else
    Decrement Life Counter
    Show Default False Slide
    'Hmm. Need slide index, to return to Next slide from False slide
    End If
    End Sub
    As you can see, that algorithm merely describes what you have told us in your post. It would really help to have a complete list of Business Rules for your project. Business rules look like snippets of code.
    • On Question Slide Click, If answer = True Then Show Next Slide
    • Else If answer False Then Show default False Slide
    • If False Slide Then Decrement Counter
    • If Counter = 0 then Show Game-Over Slide
    • On False Slide Click Show Next Slide in Questions
    • On Game-Over Slide Click, If Play Again, Show Question Slide()1 OR CheckPoint Slide(n+1), Else quit
    • If CheckPoint Slide then Reset Life Counter


    Note that the business rules are not in any real algorithmic order. They just tell you what needs to be done.

    You can format your code like I did using the # button on the Reply Editor Toolbar. You can click the Button and paste the code in between the new Code tags, or Select the code, then click the button, or you can manually type the tags before and after the code.

    If you use the "Go Advanced"editor, you get a lot more formatting options.

  3. #3
    VBAX Newbie
    Joined
    Oct 2013
    Posts
    5
    Location
    tnx for share!!

  4. #4
    Banned VBAX Newbie
    Joined
    Oct 2021
    Posts
    2
    Location
    Im sorry for bumping old thread, just to say thanks a lot! This might be helpful for my powerpoint presentation!

Tags for this Thread

Posting Permissions

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