Max variable persistent
I was wondering if i set a variable to be persistent in other dream levels, does that mean that the minimum and maximum value will also be persistent when changing?
-
Yes. Or at least, the variable settings have to be "similar"; I haven't experimented with which settings have to be the same, but my guess is the initial value, and perhaps minimum and maximum.
Did you want the min and max to be different for some reason? -
Yes, I'm using the variables as hp, sp, attack power. The minimum value stay at 0 but I want the maximum value to increase by 5 or 2 when the player upgrades one of the 3 stats. I know the current value of a variable will persist but im not sure if the maximum or minimum will persist as well.
-
Ah. The only thing that actually persists is the value of the variable. I think you'll need to just have the maximum be larger than you need at the start, and use other logic to control how the "maximum" affects things. For example, have a "maximum SP" variable as well, that kind of thing.
-
Oh, well that's a bummer, I'll need some help with that then. I'm good at logic but not that good
-
I made a small example Dream to help explain the logic. It consists of 2 remixable scenes, and carries the player-entered value of "MaxHP" from one scene to the next.
Full Dream: https://indreams.me/dream/mGcvUyjrWZw
Remixable Scene 1: https://indreams.me/scene/djzywNpgntY
Remixable Scene 2: https://indreams.me/scene/dGdnQyPXrBN
Hope that helps!
댓글을 남기려면 로그인하세요.