I created a combined status value named 'Internal Clock' set to equal the value of a variable linked to an in game clock/calendar. Basically, a variable called, 'Time_Passed', changes in a second by second loop which increases its value by one at the start, updates all the relevant calendar information to indicate the time of day/week/month/year as ties into the game, pauses for half a second before subtracting 1 from the value of 'Time_Passed' and then for another half-second before the cycle begins anew.

The status value, 'Internal Clock' whose value is tied to the 'Time_Passed' global variable is supposed to run a series of events every time the stat changes, but the events run only once and never repeat. Any idea how I can force this to work?
  • Combined status values only update when the combatant's stats are recalculated, e.g. when a status value changes.

    So, simply changing the variable will not update the status value.
    Also, the Change Game Events of status values are only used when the status value is actively changed (e.g. taking damage, getting a boost from a status effect, etc.), not from recalculations.

    You could try to use a Reset Combatant Status node to cause a recalculation of the combatant's stats.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • No dice, it's still not working. What if I make the counter a non-combined stat, attach a pair of events to the combatant object and and use those to change the stat back and forth from positive to neutral values? I think it would work if I could add a set of trigger mechanisms to the calendar to call each of the combatant events at certain points-once right at the beginning, after the 'Time_Passed' variable increases, and the other after it resets to zero. I don't believe there's a way to press an in-game button using an event, but is there another type of reliable trigger that I could use to call them, like a set of switches?



  • Hm, where's the calendar variable changed - and which combatants should it influence?

    You could e.g. have the status value just be a normal status value (without combined) and just set/change the status values directly in the event that changes the variable. If it only affects the player (or the player group), you'd just need a Player actor and a Change Status Value node (which can also change values on the combatant's group).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • "Hm, where's the calendar variable changed - and which combatants should it influence?"

    -It changes at the beginning and end of the cycle. I could send you the event('s) if you like. It adds one to the 'Time_Passed' variable first and then moves on to calculating the increase in seconds/minutes/hours/days etc. The 'Time_Passed' variable is primarily to keep track of extra time added through events, such as an hour or two that might be added by reading a book, traveling, sleeping and such, and I'd like to use it to help keep track of individual combatant features such as how long they've remained active since their last rest. The event would probably only be added to a special combatant used for playable characters, whereas a copy of this combatant, without certain events attached, would be used for NPC's to save on performance.

    "You could e.g. have the status value just be a normal status value (without combined) and just set/change the status values directly in the event that changes the variable. If it only affects the player (or the player group), you'd just need a Player actor and a Change Status Value node (which can also change values on the combatant's group)."

    -That's what I'm thinking; I just need a way to call the event. Setting it to auto and having it check every 'X' intervals of a second to wait for variable changes seems like a recipe for bugs. A single pair of switches placed within the calendar, however, should make it a lot more reliable.
  • edited January 2020
    Either do the status value updates directly in your cycle events, or set it up as a global event and call that in your cycle events :)

    A different way, instead of having to update the stats on combatants each time, you could also store the 'start time' in an object variable (or status value) on the combatant. E.g. using the Game Time float value type, you can store the game time at which they started whatever activity you want to track. To get the time they they where at it, you'd just have to subtract the stored value from the current game time (e.g. in a formula).
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • "Either do the status value updates directly in your cycle events, or set it up as a global event and call that in your cycle events :)"

    -By 'cycle events, do you mean the calendar? I suppose, since I'd be limiting the event to playable combatants that I could simply add them all to a list of found objects in the event and update their status that way, but it seems clunkier than using their own attached events to update the status. I guess what you're saying, though, is that their isn't any way to create an event trigger inside of an event apart from calling it globally. That said, referencing your suggestion, would making the status update event global and calling it then serve to trigger it on every individual combatant. Because I was not aware that it worked that way, and if so that would be awesome!

    "A different way, instead of having to update the stats on combatants each time, you could also store the 'start time' in an object variable (or status value) on the combatant. E.g. using the Game Time float value type, you can store the game time at which they started whatever activity you want to track. To get the time they they where at it, you'd just have to subtract the stored value from the current game time (e.g. in a formula)."

    -That was one of the first methods I considered, but the problem is that, keeping track of time in seconds, the variable might eventually outgrow the maximum stat cap. Admittedly, you'd have to play awhile for that to happen, but considering that traveling from one point to another via an overland map scene could add days, or even weeks worth of seconds to the 'Time_Passed' variable, it might be possible (however improbable) for players to eventually exceed that cap. There's about 31536000 seconds in a standard calendar year.
  • edited January 2020
    Yes, I meant the calendar - wherever the variables influencing the status values are changed.

    If your playable combatants are all part of the active player group, you can easily change all of them as I explained above (i.e. having a Player actor and using a Change Status Value node with Whole Group enabled).
    So, your event calls the global event, which simply updates the whole group :)

    Btw, the maximum value a status value can have is 2147483647 (the maximum a C# int can have), which should be enough for 68 calendar years :)
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • "Btw, the maximum value a status value can have is 2147483647 (the maximum a C# int can have), which should be enough for 68 calendar years :)"

    The Title of My Game is: "Around The World, On Foot, In 80 Years" :(

    Incidentally, I may, depending on your rate, be willing to pay for something like a 'Press Button' node for the event system. If you've got the time, I've got a piggy bank and a hammer. I'm sure I'll make it up in game sales, anyway. Walking simulators are the next up and coming trend on mobile.
  • Send me an email to contact@orkframework.com for commissions :)

    Although, if you need a UI button on screen, that could already be done using a Show Dialogue node (Choice type), or if you want to wait for an input being pressed, that can be done using the Wait For Input node.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • No, I mean the event itself pushes a button. I guess, depending on the type of button and what it does, that could lead to some interesting possibilities, but for a simple button use, for example, to call an event interaction attached to scene objects it shouldn't hurt anything too badly.
Sign In or Register to comment.