edited September 2022 in ORK Support
I'm running into two (possibly-related) issues, one of which may just be me confusing myself.

The main issue:
I have a (tick-machine) schematic that levels up a combatant over time. Additionally, the combatant has conditional prefabs set up, so they change prefabs according to their level. So new level/prefab every x seconds.
Works great(*), but I need their health to refill when they level, so in the Combatant Level Up Settings, I put a Schematic which is just a single node that sets the health to 100%.

With the schematic set, the combatant goes straight to its highest level when the first level change hits.
If I use the 'Full Recovery' tickbox instead, it levels and recovers as expected(**), but I only want health to recover.

The possibly-related-but-maybe-just-user-error issue:
*Before adding the level up schematic, I had the same issue of the combatant levelling straight to their highest level, until I ticked 'Always Initialize' on their (local) object variables (makes sense, you get a new prefab every level, gotta reset the timer variables). I'm confused because now I can turn 'Always Initialize' back off, but they level normally. These are prefab variants sharing a base, so I'm wondering if that's somehow relevant.. or maybe I just confused myself real good.

**Also, I found a bug amidst all of this:
The value for the highest level on my development curve is less than the level before it, and it's setting the value incorrectly.
ie. level 5 is 200, level 6 is 96.
Level 5 sets correctly to 200, but level 6 sets to 304. (I changed level 6 to 97 and it set it to 303, so for some reason subtracting that value from 400 in this case)
Post edited by SpaceDoubt on
  • A level up schematic has no impact on leveling up, so I assume it has something to do with your tick machine level up thing. I'd need to know more how that's set up.

    I'll check out the development curve thing :)
    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!
  • edited September 2022
    The Level-Over-Time Machine is pretty simple:
    bool: 'timeSet' = false
    float: 'timeToLevel'.

    First, 'timeToLevel' is set to gametime + [a number], then 'timeSet' is set true (to keep it from setting again).
    Then it just checks if gametime > 'timeToLevel' and when it is, triggers the 'Level Up' node.

    Then I'm wanting two things to happen:
    1. The combatant prefab changes due to conditional prefab setup. (New prefab also has level-over-time machine)
    2. The level up schematic runs and refills their health.

    Without the level up schematic, they level over time as expected (can even use 'Full Recovery')

    With the level up schematic, it goes from first to last level instantly.
    I added a couple console logs in there, and found my level-over-time machine only runs once, but the level up schematic runs for every level.

    EDIT: I think I've narrowed it down to the 'Change Status Value' node in the level up schematic. If I put anything else in its place, everything works.
    Post edited by SpaceDoubt on
  • Do you have any experience status value set up that uses Level exp type?
    If yes, is that set up correctly in a status development or something to give it per-level max values?

    Otherwise, the exp could always be at maximum (e.g. 0 maximum value > always levels up with 0 exp). The Change Status Value node probably just triggers a check for this.
    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!
  • Oh geez.. Nailed it!
    My game actually has 6 different types of experience and 5 of them were set to 'None', but for some reason that 6th one...

    Works perfectly now!

    Thanks so much again! I really appreciation your dedication to helping us out!
  • You're welcome - it's somewhat of my job :D
    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!
Sign In or Register to comment.