Need help with comment event input.triggers

● ARCHIVED · READ-ONLY
Started by Koi 19 posts View original ↗
  1. So I'm trying to make a notebook item that you can open up and flip through the pages. I've already got the images for each page created, and I was trying to use input.trigger script conditional branches and variables to navigate the book.

    IK70cDw.png
    9ecR18l.png
    Hopefully you can see what I was trying to do. Click Q, go to next page, change notebook variable to 2 so if you do it again, the input will jump to the next conditional branch to go to the page after that. And pressing W will erase the current page based on what variable it's currently on.

    I've worked with input.trigger scripts before for making puzzles and I've never had problems, but when I try this, it just opens up the first image but clicking Q or W does nothing.

    Does anyone know why this isn't working? Or better yet, does anyone have a simpler suggestion for how I could achieve this (possibly with arrow keys rather than Q and W)?
  2. How do you call this?
    It will only repeat if inside a loop or parallel process or similiar...
  3. Andar said:
    How do you call this?
    It will only repeat if inside a loop or parallel process or similiar...

    This is a common event that's called when you use the notebook item.

    (I've been doing art for the game for so long it's obvious I haven't been using the actual program for a while).
  4. OK and how does it loop? Or how is it called again?
    It will only react once per call in the way it is written at the moment.
  5. Andar is right, you need to put the entire thing in a LOOP and set a BREAK LOOP condition such as an option called "Close Notebook" or something.

    There is also an easier way for this without having to define multiple "page" sets to navigate. The script "Large Choices" by Hime can combine multiple "Show Choices" into a large list. I think that would be more convenient, but of course it's up to you how you design it.
  6. How should I set up the loop and break loop with what I already have?

    And it is true that I hadn't set up a "close book" action into the contents yet, I was trying to first see if the page turning would work.

    EDIT:

    I'm obviously doing something wrong. With this, all it does now is activates the page turn sound effect, then shows no image and the game freezes.

    21312_zpsao1hzihg.png
    KbzXtZ5Q
  7. Bump? I've been trying to look up tutorials on loops and break loops but whenever I think I've done it right, it just doesn't work. I'm missing something.
  8. with such a loop, you should not use script line input trigger, but the regular conditional branch button pressed.

    if that doesn't solve the problem, tell us what happens instead.
  9. Andar said:
    with such a loop, you should not use script line input trigger, but the regular conditional branch button pressed.

    if that doesn't solve the problem, tell us what happens instead.

    It did not :c I actually didn't know about the button prompt... I have no idea how I didn't since it's right above the script box, and for that matter I have no idea why the person who suggested the script feature for previous puzzles of mine they didn't just tell me to use the button thing.

    Anyway, tried that, didn't work. Decided, hey what about right and left buttons that would make even more sense for the player, that doesn't work either. Same thing happens, use the book item that calls the "Albie's Journal" common event, the 'paper' SE plays, then no image shows up and the game freezes.

    VVsWJ8O.png
  10. the difference is that the script checks if a button is pressed and released, and the button press only checks if the button is currently pressed. Which means the non-script solution can detect a button press multiple times, the script commands waits until the button is released.

    If you don't even get to the show picture, then the problem is not in the loop but in the wait. Something freezes the game in the seven frames while this event waits, and most likely that is something else entirely elsewhere.
    Remove the wait completely and test again.
    If that results in the event working, the freeze comes from somewhere else in another event.
    If the event still freezes and doesn't show the picture after removing the wait, the problem is in how you call the common event and we'll need to see the trigger and the skill.
  11. Andar said:
    the difference is that the script checks if a button is pressed and released, and the button press only checks if the button is currently pressed. Which means the non-script solution can detect a button press multiple times, the script commands waits until the button is released.

    Does that mean that whenever this ends up working, if someone holds down the left or right button it'll just flip through the pages extremely fast? I'd rather it just be one page at a time so they wouldn't accidentally miss something

    Andar said:
    If you don't even get to the show picture, then the problem is not in the loop but in the wait. Something freezes the game in the seven frames while this event waits, and most likely that is something else entirely elsewhere.
    Remove the wait completely and test again.
    If that results in the event working, the freeze comes from somewhere else in another event.
    If the event still freezes and doesn't show the picture after removing the wait, the problem is in how you call the common event and we'll need to see the trigger and the skill.

    Removed the wait, no difference. When I remove the loop command, the picture shows up again. I decided maybe I should do this with labels, and but this isn't working either (granted I have never worked with labels before). It DOES show the very first picture, but nothing works after that. I can still move my character around but the page turning functions don't do anything.

    X9UWDyF.png

    This is the page for the diary item that calls the event:

    Znl8dgb.png

    The <item type: 2> is just part of a script to put it in the key items category in my menu.

    I was thinking maybe I could just do this with choices, "Next Page, Previous Page, Close Book" but with how high up the choices are it would cover up the text. If there's perhaps a script that moves down the choices box when there is no text below it I could do that...
  12. give a screenshot of your plugin manager. If the show picture doesn't happen without the wait, then something changed the regular behaviour of the event interpreter. And that can only be done by a plugin.
  13. Andar said:
    give a screenshot of your plugin manager. If the show picture doesn't happen without the wait, then something changed the regular behaviour of the event interpreter. And that can only be done by a plugin.

    I know this is a stupid question... where do I find the plug-in manager?
  14. sorry, script editor - and scroll it down to where the scripts are added under materials.
    plugin manager is the advanced replacement for the script editor under MV
  15. Andar said:
    sorry, script editor - and scroll it down to where the scripts are added under materials.
    plugin manager is the advanced replacement for the script editor under MV

    I have 39 user scripts...

    TvARE9H.png

    Honestly at this point choices might be the only way to do this because scouring through each one of these (some are a couple lines long, but still) is probably not even worth the trouble...
  16. go the choices route...
    I have absolutely no idea how you managed to combine yanflys and victors script under Ace - a lot of people consider that impossible. Anything there might have caused this problem with the events, especially if some of those conflicts that are known to happen when combining victor and yanfly affected that.

    So if the rest works for you, consider yourself lucky and search for an alternative...
  17. Andar said:
    go the choices route...
    I have absolutely no idea how you managed to combine yanflys and victors script under Ace - a lot of people consider that impossible. Anything there might have caused this problem with the events, especially if some of those conflicts that are known to happen when combining victor and yanfly affected that.

    So if the rest works for you, consider yourself lucky and search for an alternative...

    I didn't know their scripts were seen as incompatible. I've only ever seen one glitch in my game that was completely unsolvable, so I just redid the scene.

    I'm gonna try this in a new project file without any of these scripts and see what happens. The only other thing I can think to do after already creating like 14 different art assets for this scene is to get yet another script to move the choices box down to the bottom of the screen (if that's possible to do).

    EDIT:

    Even in a completely new project it wasn't working, so obviously I was doing something wrong and we just couldn't see what. BUT, I am getting the choices thing to work with some labels working correctly as well. And I'm bypassing the issue of the choices box covering the notebook text by having a blank text box every time a new page opens up so you just press Enter to prompt the next choice box. It's working fine and I'm not running into any bugs I can't solve so far.
  18. Try something like this. it worked for me.
    journal1.PNG
    journal2.PNG

    * note for yanfly and victor sant scripts. Many of victor sant scripts will have issues with yanfly scripts, but not all. And most can be made to work together with a few edits.
    I have 51 yanfly scripts and 23 victor sant scripts in my project.