Player getting stuck after triggering event.

● ARCHIVED · READ-ONLY
Started by ProfessorTenebrae 11 posts View original ↗
  1. The player gets stuck and can't do anything after running this event. 
    What's wrong? I know I'm doing something really stupid, but I don't know what...

    Event Script 1.png

    Event Script 2.png

    I want the event to run, and then reactivate 30 seconds later.
  2. make another page with \switch b set it so that after 30 switch b is no longer active what i see is its running in an endless loop 
  3. Problem is you have "erase event" then you are trying to have it process more commands after you erased it. Remove the first line of the 2nd page.


    But even if you fix it the way you have this set up the player would have to stay on the map for 30 sec, if they left and came back it would be 30 more.

    blademan729 said:
    make another page with \switch b set it so that after 30 switch b is no longer active what i see is its running in an endless loop
    wrong.
  4. Like this?

    Event Script 3.png

    I also deleted the Erase Event input on page 2.
  5. yes, try that.


    But like I said this is only a basic version and requires the player to stay on the map for a full 30 second, if they leave and come back the time would reset.
  6. Hmmmm, so how would I go about having it run so it runs for 30 seconds no matter where the player is?

    As in,
    Harvest > get potatoes > wait 30 sec > respawn
  7. OR without scripts you  set a variable to the game timer then check if 30 seconds has past by setting another timer to a variable and checking it repeatedly against the first.

    One moment while I make an event to show you what I mean.

    Edit 

    Ok I made a working Potato harvesting event that will have it count the timer even if you are not on the map, or in battle. The only thing is that it will take up 3 variables for each and every potato event you have.

    Here is the first page, pretty standard. Except when you Harvest the potato it sets a variable to the current game timer.

    Potatos 1.pngPotatos 4.png

    Then on the second page in a  parallel process I have it Looping constantly checking if enough time has past or not using the built in game timer.

    To do this, Every single time it loops you set a 2nd variable to the current time.

    IMPORTANT: You must have have a wait in there or it will freeze your game. The longer the wait the the more potato events to can have, but the less accurate the timers will be.

    Potatos 2.png

    next you have to set a 3rd variable  to the difference of the 2nd minus the 1st Using Script input

    $game_variables[#2] - $game_variables[#1]  

    Where #1 is the number of your first variable and #2 is the number of your second variable.

    Potatos 3.png

    And Finally you have to check if the 3rd variable is Grater than or Equal to your desired length, in this case 30!

    If it is then you turn off the self switch and EXIT EVENT PROCESSING If you don't it will keep looping in the 2nd page.

    Potatos5.png
  8. Ah thanks a lot! it works perfectly now! I used the script method as it was easier, but thanks for the help RyokuHasu, I appreciate it. ^^ You too Baka-chan. ^^
  9. Personally I avoid Scripts if i can, but i'm glad it worked out.
  10. The reason I wrote the script was to allow you to have multiple events on different maps controlled by timers and to prevent the need for lots of variables. Also, the game timer is displayed on the screen, and that's not nice for things like farming systems.


    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.