Announcement

Collapse
No announcement yet.

Show Variable as String?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Show Variable as String?

    Is it possible to have variables appear in messages? For example, if you can keep track of how many battles you've fought, can you have an NPC say "You've fought X amount of battles!"?

    #2
    Re: Show Variable as String?

    Yes and no.

    You cannot insert it into dialogue as a "string," but it IS possible to make nested val cond branches that displays dialogue for each variable choice. Although, you would have to have a VERY finite amount of values for the variable. Basically, if you do not have much else going on in the event besides displaying a message to say, "You've collected 8 leprechuans with rheumatoid arthritis," then you can (I'm pretty sure) get away with ten different values for the variable. So basically, it's best to only use it to display numbers between 1 and 10 or something...

    Comment


      #3
      Re: Show Variable as String?

      Here's another way. Since the INT stat is only used for enemy AI, you can 'hijack' that stat for use in your game. You can set up an event where every time you fight a battle, a variable is increased by 1 AND your character gains 1 in INT. If you write it into the game that INT means 'the number of battles fought', players can look at their INT at any point in the game and see immediately how many battles they've fought...up to 100. If you are making a game without battles, you can actually hijack ALL of the stats...even gold and HP to mean something else in this way.

      Comment


        #4
        Re: Show Variable as String?

        check my nested variable tutorial in my sig, if you want to go the complicated route... That tutorial will give you 36 battles for the price of 500 lines, but hey, you keep your INT stat
        Last edited by JPS; 10-09-2007, 02:37 PM.

        Here I come Pav, like the Kool-Aid man barging into a funeral! Oh yeah!

        Comment


          #5
          Re: Show Variable as String?

          I think the INT stat idea is awesome, because INT is so worthless for your PC's anyway.

          Comment


            #6
            Re: Show Variable as String?

            Originally posted by Obright View Post
            If you are making a game without battles, you can actually hijack ALL of the stats...even gold and HP to mean something else in this way.

            Hmmm...after you mentioned that, it ALMOST makes me want to work on one of my games again...

            Comment


              #7
              Re: Show Variable as String?

              Obiright also suggested that when I asked item detecting or something like that.
              Game in progress: "Cards of Destiny"!
              How many of you have tried Game Maker, for PC?

              Comment

              Working...
              X