• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Need help making Input call Common Event

Rinkoou

Awful-Pun Master
  • 54
    Posts
    8
    Years
    Hi! I suck at coding and I'm trying to make it where if you pressed the V button, the game would call common event 5. Here is my code:
    Code:
    def pbAllowPneuma
      $CanToggle = true
    end
    
    def pbDisallowPneuma
      $CanToggle = false
    end
    
    def pbPneuma
      if $CanToggle && Input.trigger?(Input::V)
        pbCommonEvent(PNEUMA)
      end
    end

    I tried pbCommonEvent(5) and pbCommonEvent(PNEUMA), Pneuma being the common event name in Settings. Also, I did define V properly. If anybody could help, I'd appreciate it!
     
    Where did you place "def pbPneuma"?
    The way it's set up now it won't check for input in field. It checks when call pbPneuma

    Anything else happening?
     
    I don't know where I should place it. I tried changing which button activates it, but it still doesn't work. Can you please help?
     
    In the script section Scene_Map find
    Code:
     if Input.trigger?(Input::B)
          unless pbMapInterpreterRunning? or $game_system.menu_disabled or $game_player.moving?
            startMenu
            #$game_temp.menu_calling = true
            #$game_temp.menu_beep = true
          end
        end
        if Input.trigger?(Input::F5)
          unless pbMapInterpreterRunning? or $game_player.moving?
            $PokemonTemp.keyItemCalling = true if $PokemonTemp
          end
        end

    and before
    Code:
     if Input.trigger?(Input::B)
    add this
    Code:
     if Input.trigger?(Input::V) && $CanToggle
          unless pbMapInterpreterRunning? or $game_player.moving?  #remove this line if it can be toggled  while walking/running
    pbCommonEvent(5)
    end
    end
     
    Back
    Top