Help with on map encounters

Discussion in 'RPG Maker MV' started by Teddy97, Jun 3, 2019.

Thread Status:
Not open for further replies.
    Tags:
  1. Teddy97

    Teddy97 Veteran Veteran

    Messages:
    49
    Likes Received:
    22
    Location:
    Austria
    First Language:
    German
    Primarily Uses:
    RMMV
    Hello.

    I'm using a plugin for letting the on map enemy sprite chase the player once he detects him within a few tiles.
    If the player escapes from a battle and returns to the map, then the enemy sprite should wait some frames before chasing the player again. Meanwhile, the player should be able to move away from the enemy.

    Any ideas how to achieve that?

    Thank you in advance!
     
    #1
  2. Dreadshadow

    Dreadshadow Lv 38 Tech Magician Moderator

    Messages:
    3,840
    Likes Received:
    2,491
    First Language:
    Greek
    Primarily Uses:
    RMMV
    Hello @Teddy97!
    I'm using a plugin for..."
    Can you share us a link to that plugin please, so we can get a better grasp on what you wanna do?
    Some pictures of what you set up, can save us some time too. ;)
     
    #2
  3. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    12,402
    Likes Received:
    12,634
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    I do this as follows:

    For the battle event, first check can escape. In the if escape code, add wait (x) frames this event. Remember though that 60 frames is one second, so make sure to make it long enough that the player can actually react. I usually use 300 myself.
     
    #3
  4. Teddy97

    Teddy97 Veteran Veteran

    Messages:
    49
    Likes Received:
    22
    Location:
    Austria
    First Language:
    German
    Primarily Uses:
    RMMV
    But then the player has to wait as well till the event is finished before he can move.
     
    #4
  5. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    615
    Likes Received:
    344
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    If you start a move route as the last line of an event and then don't set "wait for completion", it'll give the player back control but still run the move route on the event.

    I personally also make them go 50% transparent and set "through" to "true" so you can't run into them again, then disable those after the wait, something like so:

    upload_2019-6-2_10-23-59.png
     
    #5
  6. Teddy97

    Teddy97 Veteran Veteran

    Messages:
    49
    Likes Received:
    22
    Location:
    Austria
    First Language:
    German
    Primarily Uses:
    RMMV
    Thank you, mate!
    I thought I had to set "wait for completion".
     
    #6
  7. Celianna

    Celianna Tileset artist Global Mod

    Messages:
    10,527
    Likes Received:
    5,533
    First Language:
    Dutch
    Primarily Uses:
    RMMV

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #7
Thread Status:
Not open for further replies.

Share This Page