Conditional Branch: When INSERTBUTTONHERE is pressed...

Discussion in 'Javascript/Plugin Support' started by BloodletterQ, Oct 24, 2015.

  1. BloodletterQ

    BloodletterQ Chaotic Neutral Assassin Veteran

    Messages:
    1,461
    Likes Received:
    1,052
    Location:
    My head's in the clouds at least...
    First Language:
    English
    Primarily Uses:
    N/A
    As some of you may know, I'm trying to get the basics of a Tales-inspired Skit system through the use of Yanfly's Region Common events.

    -I can get the balloon to pop up.

    -When I have the conditional branch for the button being pressed, it only responds sometimes. Normally the screen should darken but I often find myself pressing the key to start the skit multiple times.

    -The bubble should only pop up once while stepping on a tile where the skit is allowed. Likewise, it should dissapear when I'm off the region for the skit.

    What do I do from here?
     
    Last edited by a moderator: Oct 24, 2015
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,806
    Likes Received:
    11,509
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    I've moved this thread to JS Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
     
    Last edited by a moderator: Oct 24, 2015
    #2
  3. Andar

    Andar Veteran Veteran

    Messages:
    28,631
    Likes Received:
    6,575
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    The conditional branch event command only checks if the button is pressed in the very microsecond it is executed - it needs to be in a loop to wait for player input.


    And somehow your loop is not constant, can you post a screenshot of it?
     
    #3
  4. BloodletterQ

    BloodletterQ Chaotic Neutral Assassin Veteran

    Messages:
    1,461
    Likes Received:
    1,052
    Location:
    My head's in the clouds at least...
    First Language:
    English
    Primarily Uses:
    N/A
    Here's what I have so far. It just creates the ultimate lag and then I can't even open the menu.

    [​IMG]

    I'm sure Conditional Branches were a lot more powerful in RM2K3, I don't get the downgrade btw. Also, I'm sure there's a more convenient way to do this.
     
    Last edited by a moderator: Oct 25, 2015
    #4
  5. Andar

    Andar Veteran Veteran

    Messages:
    28,631
    Likes Received:
    6,575
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    No, it doesn't create "ultimate lag" - it takes the game control away from the main game loop.


    You need to use a parallel process if you want to continue playing while waiting for a key press.


    I don't have time now to make one for you, but the button press loop has to be outside the event for the skit itself, you need to make another common event that is set to parallel and changes switches to activate the skit events when the button is pressed.


    That parallel process would be triggered by a switch, and that switch turned on when a skit may be activated.
     
    #5
  6. BloodletterQ

    BloodletterQ Chaotic Neutral Assassin Veteran

    Messages:
    1,461
    Likes Received:
    1,052
    Location:
    My head's in the clouds at least...
    First Language:
    English
    Primarily Uses:
    N/A
    I am so sorry to be a pest Andar. I've tried what you've suggested and I'm getting a lot of lag. I've tried a party chat at the moment and I'm still getting an issue with the button press. Perhaps I should wait until there's a button press plugin?
    [​IMG]
     
    #6

Share This Page