Welcome Forums Get help Making a Stat checker

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #46894
    Eli49077
    Participant

    So my code seems to be going wrong somewhere. I think it has to do with indentation but cant fix it.  

    #47931
    Marby
    Moderator

    Hi Eli49077,

    I saw your post here today…
    How about to solve your issue like the following?

    hero loses token "Stat has been found"
    npc0021 gives choices for "Would you like to see your Stats?"
    in case "Yes"
        npc0021 gives choices for "Armor or Attack"
        in case "Armor"
            if hero number of "Armor" = 5
                npc0021 says "You have 5 extra health. Adding up to 105!"
                hero receives token "Stat has been found"
            if hero number of "Armor" = 10
                npc0021 says "You have 10 extra armor. Adding up to 110! Nice job!"
                hero receives token "Stat has been found"
            if hero number of "Armor" = 15
                npc0021 says "You have 15 extra armor. Adding up to 115! Wow I'm impressed!"
                hero receives token "Stat has been found"
            if hero lacks token "Stat has been found"
                npc0021 says "I can't seem to find any additional health bonuses!"
        in case "Attack"
            npc0021 says "Insert some screenplay here for your attack stat display..."
    in case "No"
    

    Indentations are very crucial here. If you’re not sure, how to use them, you could read a tutorial of mine for a better understanding:
    https://rpgplayground.com/wp-content/uploads/2021/05/Programming-Tutorial.pdf

    Also note, that hero number of “Armor” is just a number variable, which cannot give your hero extra power for combat. If you want to add extra “armor” power you need to change either the heroes health or set the damage of all your monsters to another value. Here are some examples:

    hero health max becomes 105
    TheMonster swing weapon ability damage becomes 95
    

    Marby.

    #53942
    Fedorakid
    Participant

    O_O

    Did you make that manual…?

    #53959
    Marby
    Moderator

    Yes, I have made it. I hope it will help many people to better understand how programming works.

    #53960
    Marby
    Moderator

    Maybe I’ve got you wrong. Note, that I only wrote the “Marby’s Programming Tutorial for Beginners” and not the other help sites.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Get help’ is closed to new topics and replies.