Announcement

Collapse
No announcement yet.

Using Variables as a Flag

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

    Using Variables as a Flag

    In RPGM2 it was easy to create a Script that switched a Flag from Off to On so that when the Event triggered the Script would do two different things.

    I understand the concept of Modes, but Variables are becoming a little tricky.
    Please dont send me the link to Crimson's Variable Thread, I've already read it, and it doesnt explain my question.

    Also, there is a certain member on the forum who has a tendency to reply to everything with:
    "So do this and this and then your done. What's so confusing? That was easy."

    You know who you are, and you know what you're doing, so if you're going to reply to this thread, please explain in Tutorial-For-Dummiesterms, it's only my second day playing the game.

    [ BACKGROUND INFO ]
    In a certain part of the game, my Main Character cannot advance through the story unless he speaks with a little boy named Rodger.

    Rodger has 2 Modes.
    Mode Number 1 is a brief conversation telling the Main Character about Luque.
    The second to last Event Code edits a variable. It reads:
    Property Control > Modify Internal Value: Luque --> Variable01 --> 1
    The last Event Code switches Rodger into Mode 2, so that the converstaion will not repeat itself.

    Luque has 3 Modes.
    I'm having trouble with Mode Number 1. I'm trying to call the Variable that I modified while speaking with Rodger (as if it were a Flag in RPGM2) I've tried using a Val-Condition Branch with 2 Options that looks like this:
    Luque
    Variable 01
    Value = Specified Value 0
    Value = Specified Value 1
    In the Actual Code, I have left Option 1 (Start) and Option 1 (End) Blank, since I dont want Luque to be visible while his Variable is equal to 0.
    I have changed Option 2 (End) so that it switches to Mode 2.
    I've even tried adding 3 Options, so that Option 2 turns the Display ON and Option 3 switches to Mode 2.

    Mode Number 2 retreives a Storyteller and then switches to Mode 3 so that 1 and 2 do not reapeat themselves.

    [ MY QUESTION ]
    How do you use a Variable like a Flag, so that a character can be invisible until the Variable is changed? (when s/he becomes visible once more)
    Last edited by Faerie; 02-22-2006, 09:00 AM.

    #2
    Re: Using Variables as a Flag

    [ MY QUESTION ]
    How do you use a Variable like a Flag, so that a character can be invisible until the Variable is changed? (when s/he becomes visible once more)

    I think the answer is similar to the way RPGM2 works, but with an extra step.

    I am at work and can't give this in full detail, but in General: You need an auto event to orchestrate this.

    NPC Modes do not change automatically and NPCs can't be set as Auto events, so use a decoration (or invisible event) set to Auto and dependent on the variable.

    Set it up like this:

    The variable starts at zero and the NPC in mode 1 (invisible) (Display off in the Mode Editor).

    Script the Auto Event like this:

    Mode 1: Condition : XXX Variable = 1
    Event Transtition: [Character in Question] Mode 2
    XXX Variable = 0
    Add Mode

    Mode 2: Condition: XXX Variable = 0

    Once in Mode 2 the NPC can play his storyteller and transition his own mode, I believe.

    I hope that helps.

    And

    Originally posted by Faerie
    Also, there is a certain member on the forum who has a tendency to reply to everything with:

    "So do this and this and then your done. What's so confusing? That was easy."

    You know who you are, and you know what you're doing, so if you're going to reply to this thread, please explain in Tutorial-For-Dummiesterms, it's only my second day playing the game.
    Moi?

    I guess I never made clear that every single time I say "That Was Easy!" I am picturing Sir Robin (Eric Idle) in Monty Python and The Holy Grail. The scene at The Bridge of Death. Just after John Cleese answers The Three Questions. If you hear me say it (like I do so often) you'd understand.

    Sorry if you misunderstood!

    It is by no means a value judgement on those asking questions!

    What did you think I was doing?

    Peace and Welcome to the boards!

    MOO!




    Comment


      #3
      Re: Using Variables as a Flag

      Hahahaha! I'll never say who I was talking about >.>
      And I suppose it was so early in the morning that my head was starting to spin and I wasnt thinking straight

      Hehehehe Thanks for your help though, that was very informative

      Comment


        #4
        Re: Using Variables as a Flag

        Also, I suggest you test the results of the event's display on/off. When I tested an event that was to be appearing and disappearing, it only took the first effect and no more. It disappeared and not reappear, and vice versa. Hope that'll relieve any later confusion.
        Quote of the moment - "When you cut down a tree, don't stand near it."

        Comment


          #5
          Re: Using Variables as a Flag

          I think that depends on how you execute the commands.

          If you use is a "Display On" command, it will work immediately.

          If you simply change modes on an NPC from display off to diplay on you need to refresh the display.

          This happens either with the script command "refresh display" or when you enter and leave a map.

          Good Luck with it.

          Peace.

          MOO!




          Comment


            #6
            Re: Using Variables as a Flag

            Originally posted by Rodak
            I guess I never made clear that every single time I say "That Was Easy!" I am picturing Sir Robin (Eric Idle) in Monty Python and The Holy Grail. The scene at The Bridge of Death. Just after John Cleese answers The Three Questions. If you hear me say it (like I do so often) you'd understand.
            Heh heh heh...didn't get it before, but it makes sense now!
            So, from what I've gathered, Faerie knew how variables worked, but just did not know about the refresh display command? That one got me for a while too...
            Anywho, welcome to the site. In the future, if you have another question, check here, and if the answers not there, let me know when you find the answer and I'll add it. (I already added the bit about the refresh display command. Thanks!)
            Last edited by hitogoroshi; 02-22-2006, 05:12 PM.

            Comment


              #7
              Re: Using Variables as a Flag

              Originally posted by hitogoroshi
              Heh heh heh...didn't get it before, but it makes sense now!
              Yeah, the more I think about it, the more I realize how it could be misconstrued!

              I guess I owe Faerie one for pointing it out!

              Sarcalepsy has it's drawbacks!

              I think I'll add a "[/Eric Idle Impersonation]" after that in the future.

              That'll be Easy!

              Ummmm... Don't wanna get off topic here, so I'll point out that you may wish to consider an auto event on the map that leads to the map with the auto event controlling the guy's modes.

              I had problems where I needed to reset an auto event back to it's mode one for every time the map was entered.

              That may not apply here, but it's a useful idea to have auto events working in pairs on separate maps.

              Peace.

              MOO!




              Comment

              Working...
              X