RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Event wait timers to continue while off map?

0 Members and 2 Guests are viewing this topic.

**
Rep: +0/-0Level 74
RMRK Junior
Now in the correct section.

So, I have resource nodes in my game, which have wait timers to respawn after you harvest them. When I leave the map, the event page with the respawn timer resets. Is there a way to avoid this? I'd like for them to continue while on a different map.

I'm not sure if this can be done just from eventing, but I'm sure a script would be a lot easier to maintain (if its possible that is) for each resource node.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, you could do it with variables. All you need to do is start the timer like this once the resource is harvested:

@>Conditional Branch: Variable [XXXX: Timer] > 120
      @>Do all the stuff to harvest the resource...
      @>Control Variables: [XXXX: Timer] = 0
      @>Control Switches: [YYYY: Hidden Timer] = ON
      @>
  :  Branch End
     
Now make a parallel process common event triggered by the YYYY: Hidden Timer switch:

@>Wait: 60 frame(s)
@>Control Variables: [0XYZ: Timer] += 1
@>

The 120 in the first event is just the amount of time in seconds you wanted it to wait. So that would be two minutes. If you wanted it to be 7 minutes and 24 seconds, then it would be 444, and so on.

Depending on how many resources you have, it could get pretty bulky and tedious, but it shouldn't be too laggy.

**
Rep: +0/-0Level 74
RMRK Junior
Am I doing this correct? Because I can't seem to be able to mine them now.





*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, the first time you need to manually set the variable to > 60. So, when the game starts or whatever you can set the variable to 61. Either that or you could use a self-switch at the top of the event like this:

@>Conditional Branch: Self-Switch A is OFF
      @>Control Variable: [0005: Mining Respawn] = 61
      @>Control Self-Switch A = ON
      @>
  :  Branch End

That would be right above it on the same page, and it would just make it so that the very first time you automatically get it.

The other problem with your event is that your variable and switch operations are outside of the conditional branch. That means the timer will be reset everytime the player checks for ore, even if it was before the time would have run out. That part should be inside the Timer conditional branch, right below the Mining Conditional Branch and above the Else.

**
Rep: +0/-0Level 74
RMRK Junior
Perhaps its me being so sleep deprived, but I still can't get this to work. If I set the timer conditional branch on top, I can't gather the ore. If I set the pickaxe conditional branch, I can't get the timer to start. I tried many different variations, mixing around the events, but those didn't work either.

I think I may need someone to show me a working picture of the event similar to mine. If that isn't too much to ask.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
I've attached a demo. I set the time to only be 30 seconds so you can test it easier. You can buy a pickaxe from the blue haired vendor.

The timer is in the first common event.

**
Rep: +0/-0Level 74
RMRK Junior
Thanks for all your help MA, you're probably one of the most helpful members in all the rpg maker communities. I have one more question though. I toyed around with the demo a bit before I went to work, and it seems to work nicely. I've added a self switch to the event so once harvested, it removes the graphic until it respawns. I can see now why my approach wasn't working, and I've learned a lot, thank you!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
I'm always glad to help :) Well, usually anyway. There's no question in that post though, so I will assume that you were going to ask how to make it so the graphic would disappear but figured it out on your own and forgot to take that sentence out of the post.

**
Rep: +0/-0Level 74
RMRK Junior
I'm always glad to help :) Well, usually anyway. There's no question in that post though, so I will assume that you were going to ask how to make it so the graphic would disappear but figured it out on your own and forgot to take that sentence out of the post.

Oh whoops, yeah you got it. xD

**
Rep: +0/-0Level 74
RMRK Junior
Sorry for the double post, but I'm on the verge of ripping my hair out. So, I got home from work, all excited that the resources would now respawn. I did a simple copy and paste with new renamed variables and switches. Loaded up my game, and the ore didn't respawn. Loaded up yours, and it did.

Rechecked all variables, conditional branches and switches compared to yours, exactly similar, yet different results. I'm quite confused.







*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
They do look the same to me. Did you remember to copy the common event as well?

**
Rep: +0/-0Level 74
RMRK Junior
They do look the same to me. Did you remember to copy the common event as well?

Yup, I have it. Changed the variable in it and everything.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Changed the trigger switch too?

I'm confused about your second page too, really. Almost all of it is unnecessary, aside from the variable check and turning Self-Switch B off. You should also put in a few wait frames since it won't need to check all the time. But as far as I can tell, the extra stuff you have would only cause a real problem if the player didn't have a pickaxe - it wouldn't cause the problem you are speaking of.
« Last Edit: May 14, 2011, 01:02:32 AM by modern algebra »

**
Rep: +0/-0Level 74
RMRK Junior
Changed the trigger switch too?

Wow I'm an idiot...! Had it set under the wrong switch, >.< Sorry for wasting your time lol.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
No worries. I also edited my last post with some comments about your second page.

**
Rep: +0/-0Level 74
RMRK Junior
No worries. I also edited my last post with some comments about your second page.

Yeah, I know. I'm still toying around with them. Thanks for your help once again. :)