• 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.

Deleting an event with a certain name that the player is facing?

  • 81
    Posts
    8
    Years
    • Seen Sep 7, 2019
    I want to delete an event with a certain name like "bug" or somthing and have it erased if the player is looking at it. I tried combining the Erase event with the name but I want the player to be right next to it and has to be facing it.
     
  • 38
    Posts
    8
    Years
    • Seen Nov 26, 2023
    im not sure if i understand what you want, but:

    you can use a combination of conditional branchs and switchs where IF player SEE the "bug" event, switch X is on and IF switch X is on, event "bug" disappear.

    To do what i said, just use the logic, basic commands and some pages in the main event(that'll control this scene).
     
  • 81
    Posts
    8
    Years
    • Seen Sep 7, 2019
    Or I can do :P
    Code:
    facingEvent=$game_player.pbFacingEvent
    if !facingEvent || facingEvent.name!="SRock"
      Kernel.pbMessage(_INTL("There's nothing to move."))
    elsif facingEvent && facingEvent.name=="SRock"
      facingEvent.erase
      $PokemonMap.addErasedEvent(facingEvent.id)
    end

    But thanks anyway btw I just made that use it if you want. I'm using it in a common event
     
    Back
    Top