Timer Help?

Discussion in 'RPG Maker VX Ace' started by Mrpaulyshore, Apr 17, 2014.

  1. Mrpaulyshore

    Mrpaulyshore Veteran Veteran

    Messages:
    76
    Likes Received:
    1
    First Language:
    english
    I have an autorun event that sets a common event called "Timer" trigger by a parallel process from a switch called Time. What it "used" to do was switch on the timer in my game event where my characters are trapped in a house fire and have ten minutes to save everyone and get out alive. The timer used to count down from 10:00 and when it got to zero the game would end. However, I have no idea what changed but now when the event occurs the timers just freezes and won't count down. even old game saves when the event was working now has the timer stuck in it's tracks. I am frustrated beyond belief because this timer issue is the last thing I need to finish off the first major segment of my game.

    The common event has a conditional branch triggered by a parallel process saying if the timer is zero then you burn alive.

    Time is a switch that is supposed to prompt the timer to appear after if it is called in the autorun event. 

    So please someone give me a suggestion or a helping hand. And no I am using any time scripts whatsoever. 
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,349
    Likes Received:
    11,146
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Have you added any OTHER scripts (even if they have nothing to do with timers) and didn't check them carefully for variables or switches? If you need to set a switch on a new script and you don't (leaving it to the default switch), it COULD be the same switch that your timer event is using, which would cause it to not behave as you expect.


    That's all I can think of. If it's not that, take screenshots of the event windows of any associated events, showing the WHOLE event window (conditions, commands, and all), and if any events have multiple tabs (these won't be common events obviously) make sure you provide images of each tab. Then add links to them to the thread so we can see EXACTLY what you've got happening.
     
    #2
  3. Mrpaulyshore

    Mrpaulyshore Veteran Veteran

    Messages:
    76
    Likes Received:
    1
    First Language:
    english
    I found the root, I got this custom fog script from a friend and it really did a number on my maps...No idea why it would bog down a timer event though??

     

    class Scene_Map < Scene_Base

      

      def start

        super

        SceneManager.clear

        $game_player.straighten

        $game_map.refresh

        $game_message.visible = false

        create_spriteset

        create_all_windows

        create_fog

        @menu_calling = false

      end

      

      def create_fog

        @fog=Plane.new

        @fog.bitmap = Cache.picture("fog")

        @fog.opacity=0

        @fog2=Plane.new

        @fog2.bitmap = Cache.picture("fog")

        @fog2.blend_type = 1

        @fog2.blend_type = 2

      end

      

      def update

        super

        $game_map.update(true)

        $game_player.update

        @spriteset.update

          update_scene if scene_change_ok?

          if $game_switches[98]

              if @fog.opacity!=100

                 @fog.opacity+=2

                 @fog2.opacity+=2

               end

        @fog.ox+=1

        @fog2.ox=@fog.ox/2

        @fog.oy+=1

        @fog2.ox=@fog.oy/2

      end

      if !$game_switches[98]

         @fog.opacity=0

         @fog2.opacity=0

         @fog.ox=0

         @fog2.ox=0

         @fog.oy=0

         @fog2.oy=0

       end

     end

     end
     
    #3
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,349
    Likes Received:
    11,146
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Well, that uses switch 98. You don't happen to use switch 98 for your timer, do you? That script just checks the switch, it doesn't change it. But if it expects it to be used, there must be something else (probably in an event) that changes it.
     
    #4
  5. UndefinedFate

    UndefinedFate Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    German
    I had a similar problem today I think.

    When the map starts I thought the switch whould be always in Off state, but that was not true. I needed to add a line that sets the switch to Off state at the beginning of the map. After that everything worked as exspected.
     
    #5
  6. Shaz

    Shaz Veteran Veteran

    Messages:
    37,349
    Likes Received:
    11,146
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Switches ARE always turned off until you turn them on.  If you have a switch that is on as soon as a map loads, it was either:

    - turned on but a parallel or autorun event (including common events)

    - turned on on a prior map

    - turned on in a save file you've loaded

    - used by a script that turns it on by default

    This is not the same as what the OP is asking, so you should start a new thread for your issue.  And although you think you've got it working now by turning the switch off manually, I recommend you do ask for help, because you need to find out WHY that switch was on in the first place.  Turning it off when you don't know why it was on means it's probably used by something else, and you could be breaking that something else by changing it.
     
    Last edited by a moderator: Apr 20, 2014
    #6
  7. UndefinedFate

    UndefinedFate Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    German
    Ok thanks, found the problem by myself.Only a small mistake in the if Statement.
     
    #7

Share This Page