Player getting stuck after triggering event.

Status
Not open for further replies.
Joined
Jun 4, 2014
Messages
7
Reaction score
0
First Language
English
Primarily Uses
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.
 

ElementalLight

Resident Anime Junkie
Veteran
Joined
Apr 2, 2014
Messages
249
Reaction score
57
First Language
english
Primarily Uses
RMVXA
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 
 

RyokuHasu

Developer
Veteran
Joined
Jun 23, 2012
Messages
274
Reaction score
37
First Language
English
Primarily Uses
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.

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.
 
Last edited by a moderator:
Joined
Jun 4, 2014
Messages
7
Reaction score
0
First Language
English
Primarily Uses
Like this?

Event Script 3.png

I also deleted the Erase Event input on page 2.
 

RyokuHasu

Developer
Veteran
Joined
Jun 23, 2012
Messages
274
Reaction score
37
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:
Joined
Jun 4, 2014
Messages
7
Reaction score
0
First Language
English
Primarily Uses
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
 

RyokuHasu

Developer
Veteran
Joined
Jun 23, 2012
Messages
274
Reaction score
37
First Language
English
Primarily Uses
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
 
Last edited by a moderator:
Joined
Jun 4, 2014
Messages
7
Reaction score
0
First Language
English
Primarily Uses
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. ^^
 

RyokuHasu

Developer
Veteran
Joined
Jun 23, 2012
Messages
274
Reaction score
37
First Language
English
Primarily Uses
Personally I avoid Scripts if i can, but i'm glad it worked out.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top