Daily Task System Events

● ARCHIVED · READ-ONLY
Started by iskillzi 4 posts View original ↗
  1. Hello, I'm working on making a daily event system where a player can have say 6 things done in one day via events (for a text based game) so I'm wondering if this sort of event processing branch would work for it.

    Skip to the last section of this post to answer my main question unless you want to help me figure out a better way to do this than I came up with.

    So max of 6 events/day and after those 6 it'll trigger something that forces the player to end the day:

    So for this approach to make it simple on myself I'll give the player a custom key item (which does nothing alone) and after they recieve 6 of these key items I'll have a (parallel running event?) on the map that activates if they have 6 of the specific item, then it first removes those 6 items, teleports them to their bedroom map, fades out screen, waits for a few seconds, fades in screen, then the next day begins..

    So to make the above work properly I would also need a system to keep track of days which I guess could be via another key item that does nothing on its own? then another parallel running event will continuously check their inventory for X amount of these and when they have that X amount the final event of the game will play.

    Pretty much I just figured most of it out by myself actually but what I'm wondering still is if parallel would work for these events because it should constantly run in the background to keep checking for that X amount of items without interfering with the gameplay then when they have X amount of items it'll stop them from doing things and execute the event processing correct?
  2. No, you don't need a parallel event running, checking something 60 times per frame, when you know EXACTLY when the situation is going to change (ie - when they get another item). If you were going to do it that way, I'd say to create a common event with no trigger that checks if you have 6 of them, and if you do forces the day to end, then every time you give the item, do a Call Common Event.


    However, you don't even need to give them an item. Just increment a variable from each event, and when the variable hits 6, that's your end of day. To make sure the same event can't increment the variable twice, turn on a self switch. When the next day begins, set the variable back to 0.


    The issue you will have is if you want those 6 events to reset the next day. To do that, you could either use a switch instead of a self switch on each event, and make sure each uses a different switch, then when the next day begins turn off all switches so you can "talk" to that event again, or still use self switches, but have your "start next day" event turn them all off.


    You can turn off one event's self switch from another event like this (let's say you want event 5 on map 18 to have self switch A turned off):

    Script: $game_self_switches[[18,5,'A']] = false
    Everything you are talking about doing (keeping track of how many things you've done on the day, keeping track of what day it is) can be done using variables. That's what they're there for. Learn about them. Don't use items.
  3. Shaz said:
    No, you don't need a parallel event running, checking something 60 times per frame, when you know EXACTLY when the situation is going to change (ie - when they get another item). If you were going to do it that way, I'd say to create a common event with no trigger that checks if you have 6 of them, and if you do forces the day to end, then every time you give the item, do a Call Common Event.

    However, you don't even need to give them an item. Just increment a variable from each event, and when the variable hits 6, that's your end of day. To make sure the same event can't increment the variable twice, turn on a self switch. When the next day begins, set the variable back to 0.

    The issue you will have is if you want those 6 events to reset the next day. To do that, you could either use a switch instead of a self switch on each event, and make sure each uses a different switch, then when the next day begins turn off all switches so you can "talk" to that event again, or still use self switches, but have your "start next day" event turn them all off.

    You can turn off one event's self switch from another event like this (let's say you want event 5 on map 18 to have self switch A turned off):

    Script: $game_self_switches[[18,5,'A']] = falseEverything you are talking about doing (keeping track of how many things you've done on the day, keeping track of what day it is) can be done using variables. That's what they're there for. Learn about them. Don't use items.
    Thanks this helps a lot, I completely forgot about the variables in the system.. Just another question so I don't have to create another post, to randomize events (such as have 3 possible outcomes from 1 single choice) would I use variables as well?
  4. Absolutely. In Control Variables there's a Random option - just say between 1 and 3. Then use Conditional Branches to say if it's 1, do this, or if it's 2 do that, or if it's 3 do something else.


    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.