Announcement

Collapse
No announcement yet.

Transferring Time from one map/dungeon to another..

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

    Transferring Time from one map/dungeon to another..

    Hi!Ok,I'm trying to create a game that involves you needing to beat the last boss(aka beat the game)In under the game life span and as soon as it hits the last second,*POOF*Game Over you lose because you didnt kill the boss:P. Easier said than done x.x. I got the script down but the sad part is....I don't know how to transfer that info when i enter a different area. For example,lets say it was on Year 3,Month 5,Day 1,Hour 5,Minute 21,and Second 2 and I move to a different map,I want it so that it will still stay that same exact time,and NOT Restart all over. If anyone knows how to do this,plz tell me.

    #2
    Re: Transferring Time from one map/dungeon to another..

    Well, first off welcome to the Pav.

    Secondly, line and sentence breaks are your friend, along with spacing and punctuation. Not trying to nit pick but it makes it a lot easier to read something for help.

    Thirdly, to answer your question, you will need to use a variable to keep the time. So choose one of the variables from 260-989 and use that as your time variable. Then in every map you just have a action script which subtracts from that variable. This way it will be the same time everywhere. I'm not exactly sure how you got this to work without a variable, but a variable is what you need.

    But if you are already using a variable, what I imagine you did is set the variable at the beginning of the default enter map script. So all you need to do to make sure it's only set once is use a flag. Any flag from 260-989 will do. When you set the time also set this flag to on. So say the variable you use is called Time and is variable 261, and the flag you use is called Time Set and is flag 261, you should do this

    SB: Condition Flag 261[Time Set] Off
    Data: Variable 261[Time] = 9000000 + 0 // or whatever time should be at the beginning
    Data: Flag 261[Time Set] On
    SB: End

    This will ensure you only set the time once.

    As a thought on this I'm not sure it's such a great idea to force the player to complete your game in under this time if it's a really long game as it would be very frustrating to the player to finish the game one minute too late and have to start all the way over. But if it adds to the story of your game so be it I guess.
    はじめまして。真(しん)の冷静(れいせい)です。どうぞよろしく。
    http://www.thetruecoolness.com/

    5198-2124-7210 Smash

    Comment


      #3
      Re: Transferring Time from one map/dungeon to another..

      Srry bout that, Guess I didnt explain it too well....
      ANYWAYS...I did use variables to create the time script. The script i created was as folos:
      Script Branch Condition(Repeat):Flag 0 on (fixed)
      Data: Second Vari = Second Vari + 1
      Wait:60 frames (seconds)
      Branch End
      Script Condition Second Vari = 5
      Script Data: Minute Vari = Minute Vari + 1
      Script Data: Second Vari= 0

      and repeats in that same matter for Hour , Day, Month, and Year although not all of the numbers are the same. To make the game end at the very end of the last year: I used an ACTION Script for the time script but the end game thing was CONTENT. which was as folos

      Other: Finish Game

      and I got that to work using a CALL Script. All Im confubbled with is how to get the time to stay the same when you move from different maps. It seems like I solve one problem like getting a perfect "who gets the item system" (which suprisingly, all you had to do was copy a premade script (Chest:Item) and re-edit it a slight bit) to a perfect time script x.x Thanks for answering thought

      Comment


        #4
        Re: Transferring Time from one map/dungeon to another..

        Srry bout that, Guess I didnt explain it too well....
        ANYWAYS...I did use variables to create the time script. The script i created was as folos:
        Script Branch Condition(Repeat):Flag 0 on (fixed)
        Data: Second Vari = Second Vari + 1
        Wait:60 frames (seconds)
        Branch End
        Script Condition Second Vari = 5
        Script Data: Minute Vari = Minute Vari + 1
        Script Data: Second Vari= 0

        and repeats in that same matter for Hour , Day, Month, and Year although not all of the numbers are the same. To make the game end at the very end of the last year: I used an ACTION Script for the time script but the end game thing was CONTENT. which was as folos

        Other: Finish Game

        and I got that to work using a CALL Script. All Im confubbled with is how to get the time to stay the same when you move from different maps. It seems like I solve one problem like getting a perfect "who gets the item system" (which suprisingly, all you had to do was copy a premade script (Chest:Item) and re-edit it a slight bit) to a perfect time script x.x Thanks for answering though Oh and Also, I didn't actually set it yet,I just knew that finding out how to get the time from one place to another was beyond what I could do. I know quite a bit about RPG Maker 2 to get around and even can get some hard scripts working. PS. It can also add on to the game because many of the games event I would set up would revolve around time. (Ex. A special cave only opens during winter.) And if you think about it, If the boss say appeared in 5 years and wouldn't destroy the world until 10years pasted because he had to take that long to recharge his power or w/e, then it would make sense I would have a time limit because if you didn't Then what if you didnt get to him till 15 years?He still wouldn't have destroyed the world x.x so if I set it the game to end at 10, that indicated that you have clearly died from the power of him xD lol

        Comment


          #5
          Re: Transferring Time from one map/dungeon to another..

          Well you might need to explain it a little more clearly but from your script the problem is you are never breaking out of the inifinite loop which only updates the minutes or hours. It should be like this

          SBC = script branch condition
          SBR = script branch repeat
          SBE = script branch end

          SBR Flag [Off (fixed)] Off
          - SBC Variable Days < 1
          -- Data: Year = Year - 1
          -- Data: Days = 365 + 0
          - SBE
          - SBC Variable Hours < 0
          -- Data: Hours = 23 + 0
          -- Data: Days = Days - 1
          - SBE
          - SBC Variable Minutes < 1
          -- Data: Hours = Hours - 1
          -- Data: Minutes = 60 + 0
          - SBE
          - SBC Variable Seconds < 1
          -- Data: Minutes = Minutes - 1
          -- Data: Seconds = 60 + 0
          - SBE
          - Seconds = Seconds - 1
          - Wait 60F
          SBE

          So try this as your time counter script.
          Last edited by thetruecoolness; 11-08-2006, 11:06 PM.
          はじめまして。真(しん)の冷静(れいせい)です。どうぞよろしく。
          http://www.thetruecoolness.com/

          5198-2124-7210 Smash

          Comment


            #6
            Re: Transferring Time from one map/dungeon to another..

            Thanks..but the sad truth is I'm not going for a time counter lol I'm trying to make the time as if it were harvest moon where it increases lol.Going backwards seems to complicate things further
            Srry for all the trouble
            Last edited by Illutian Playa; 11-09-2006, 01:43 AM.

            Comment


              #7
              Re: Transferring Time from one map/dungeon to another..

              Well it would be a very similar script, except increasing the numbers instead of setting subtracting, and changing the conditions to check for 0 and not their max value, and then setting the old values to 0. So from that script you should be able to get a clock that works like harvest moons as well. Just reverse all the checks.

              On a forum related issue, instead of reposting your post after it and adding to it (called double posting) just edit your original post. It is techinically against the rules, but unless you do it a whole lot you likely won't get in trouble. Just for future reference the edit button is your friend.
              Last edited by thetruecoolness; 11-09-2006, 02:21 AM.
              はじめまして。真(しん)の冷静(れいせい)です。どうぞよろしく。
              http://www.thetruecoolness.com/

              5198-2124-7210 Smash

              Comment


                #8
                Re: Transferring Time from one map/dungeon to another..

                Yeah,Im familiar with double posting and that it usually isn't aloud but it happened because I pushed submit reply twice by accident.I tried to delete it but couldn't x.x
                And thanks for the help once again
                I think it should be right but I can't be too sure because I set a test with the seconds that looks like this:
                (Action Script)
                SBR: Flag [Off {Fixed}] Off
                SBC Second Vari < 5
                Call Script: Game End (Has the Finish Game command)
                SBE
                Data: Seconds + 1
                Wait 30F
                SBE
                It was all under a action command.The Finish Game command is content only so I had to create a new script. I checked that everything was working. The event for the test time was in event placement which was then put into world organization. I know it was working (other than the end game part) because I set the event to look EXACTLY like the Hero you were playing as.Naturally,The script should've caused the game to end when it hit 5 seconds but it just kept going on. Is there something wrong with the test script?
                Last edited by Illutian Playa; 11-09-2006, 05:05 PM.

                Comment


                  #9
                  Re: Transferring Time from one map/dungeon to another..

                  Well I'm not sure but that might be a Content script command only. You can't call those commands from an Action script, even if it says it's a Content script. Some commands are action only and can't be called from a content script, and some are content only and cannot be called from an action script. So the first script called in a chain of scripts (using call commands) sets the type of all the scripts. So if you call a content script from an action script, you still cannot execute content only commands because its technically an action script still. So to help ease the confusion, make any script you call from an action script and action script (this will cross out the commands you can't use). And also make all scripts called from a content script content type so you make sure you don't use any action only commands in it.

                  I'm not sure if Nash's trick is posted here, but he found a way to use Content scripts like action scripts (meaning they can execute at the same time as other scripts). That's a bit advanced though.

                  What you can do though is make it so the player cannot move and then tell them to hit the square button and end the game (the square button calls the Content script setup in game settings for the button).
                  はじめまして。真(しん)の冷静(れいせい)です。どうぞよろしく。
                  http://www.thetruecoolness.com/

                  5198-2124-7210 Smash

                  Comment


                    #10
                    Re: Transferring Time from one map/dungeon to another..

                    I had a feeling you couldn't use content scripts in action scripts x.x
                    Isn't it also possible to just make a new page on the event that when it hits a certent time,its content script will activate?As in I made a second page to the time event with NO Action script in it and its condition was say Second Vari < 5 then Game End Script activates. If that can't work, how do I disable movement? I'm very sorry for wasting your time having to answer my questions

                    Comment


                      #11
                      Re: Transferring Time from one map/dungeon to another..

                      Well, page conditions are only checked after a content script ends, so your idea won't work. However, as TheTrueCoolness has pointed out, you could make the player unable to move, then blacken the screen and make the player press []. To disable player movement, you simply have to use the command:

                      Data: Flags: No Movement [ON]
                      .

                      Comment


                        #12
                        Re: Transferring Time from one map/dungeon to another..

                        Ah well,that works out fine.Thank you for all the helpyou guys have done

                        Comment


                          #13
                          Re: Transferring Time from one map/dungeon to another..

                          You're very welcome!
                          .

                          Comment


                            #14
                            Re: Transferring Time from one map/dungeon to another..

                            YAY! I figured out how to actually transfer the time! and it only took my brain x.x
                            Ok, what I did was,I made this script:
                            Data: Variable: Minute= Minute
                            Data: Variable: Hour= Hour
                            Data: Variable: Day= Day
                            Data: Variable: Month= Month
                            Data: Variable: Year= Year

                            This was a content script put into a system event. What the script does is make is so say the month was 5,then when u enter a new map, instead of restarting back at 0, it stays at 5. Now, what i did was I inserted that into every world organization's "enter map" script. I tested this using only 15 minutes with 2 maps. I just teleported between the 2 maps and after 15seconds of warping between these 2 maps(Discluding the teleporting black screen intro), On the world map, It was at about 14 seconds so after taking a couple of steps, the script that had the time counter going up hit 15, and activated the stop movement flag set in there!

                            Comment


                              #15
                              Re: Transferring Time from one map/dungeon to another..

                              That somehow seems like a longer process than it needs to be, but if it works, go with it, i say
                              I love lamp.

                              Comment

                              Working...
                              X