Combining YEP Event Chase & YEP Region Restriction to make territorial monsters?

Discussion in 'Javascript/Plugin Support' started by Damascus7, Oct 1, 2019.

  1. Damascus7

    Damascus7 Veteran Veteran

    Messages:
    42
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMMV
    So I have a concept of making territorial enemies in my game. I think it's probably possible with these two plugins, but I just have no idea how to implement it. I have three major things I want this combination to achieve.

    1) I know that with YEP Event Chase, you can make a monster give chase if you come within sight of it. If possible, the first thing I want to do is make it so that when it's not chasing the player, it's moving randomly inside its region. From what I can see, you have to place Yanfly's Chase script under its autonomous movement. I don't see any settings that would allow me to switch its movement between Yanfly's script and random autonomous movement.

    2) If the player leaves the monster's restricted region during a chase, the monster will of course be stuck at the edge of the region, unable to chase the player. At this point, once the player moves a certain distance away from the monster, I'd like it to return to the center of its region and switch back to random autonomous movement. If the player remains close to it, I want to keep attempting to chase the player, ready to intercept him if he should try to reenter the region.

    3) This one is optional, but if there is a way to actually do it, I'd like to implement it. I'd like to switch the enemy's restricted regions depending on whether its chasing the player or moving randomly; specifically, to extend its region when its chasing the player. Once the enemy is scripted to return to the center of its region, after arriving there, I want to switch its restricted region back to the smaller one.

    Any help on this, would be greatly appreciated!
     
    #1

Share This Page