Changing the Trigger type of an event page, or using two different Triggers at the same time.

Discussion in 'RPG Maker MV' started by The_Black_Knight, Dec 29, 2018.

  1. The_Black_Knight

    The_Black_Knight Veteran Veteran

    Messages:
    55
    Likes Received:
    3
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Is there a way to either change the type of a trigger an event page has, or maybe run two event pages simultaniously?

    What I'm specifically trying to do here is to have patrolling NPCs, that will chase the player once seen, and on touch initiate a battle, but if the player manages to press a button behind an NPC that hasn't spotted him, the NPC will die without a battle.
    I'm using yanfly's Event Encounter Aid and Event Chase Player, and can manage both of these seperately, but haven't been able to get these to work simultaniously on an NPC.
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Just have your button turn on a switch, and add a final page to the NPC conditioned by that switch, so he'll disappear when the button is pressed.
     
    #2
    The_Black_Knight likes this.
  3. The_Black_Knight

    The_Black_Knight Veteran Veteran

    Messages:
    55
    Likes Received:
    3
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Man, thanks! Didn't even notice I could do that, thought that seemed a bit weird.
    Another issue though, I would like for a dead guard sprite to take it's place, and at the moment the new image doesn't show on the map. If I change the image to the "walk" sprite of any other character the change does work though.
     

    Attached Files:

    #3
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Try checking the Direction Fix box on the page with the down sprite.

    Ace and MV do some funny stuff when changing event pages - under certain conditions it won't change the facing direction of the sprite, so if your 'down' sprite is not on the same row as the 'walking' sprite at the time you change pages, it won't show correctly.

    Does your code above work? For Player Touch, the event will turn to face the player before any of the event commands are executed. You would need another script to stop that happening so you could check if the player is facing the event's back, otherwise by the time that command gets run, the player and event will be facing each other.
     
    #4
  5. The_Black_Knight

    The_Black_Knight Veteran Veteran

    Messages:
    55
    Likes Received:
    3
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Already tried with direction fix too and it didn't work, I did have "walking" enabled then aswell though, so maybe that affected it? Can't go check right now.
    And yeah, the script works, it's part of yanfly's Event Encounter Aid plugin.
     
    #5
  6. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    You could try putting an autonomous move route in the second page, set to not repeat, with a command to turn in the appropriate direction for that sprite. Still won't fix the pattern though.
     
    #6
  7. The_Black_Knight

    The_Black_Knight Veteran Veteran

    Messages:
    55
    Likes Received:
    3
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Couldn't get it to work with setting it to turn either, so I decided to just brute force it, and added as many "dead" sprites to the spritesheet of the dead guard as the walking sprite sheet has.
     
    #7
  8. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    yeah, that's another alternative I was thinking of, but I didn't want to suggest it. People can get it working without having to do that and it's a waste of sprite space. But it works :)
     
    #8

Share This Page