Hello everyone.
I am attempting to tackle a modified version of Cyjons Loan Jar, where you can decide which days of the week it should charge interest. I made a functional object where you toggle it in a BCON, but I'd like to learn how to set it from inside the game to make it more user friendly. Cyjons original lets you set interest from inside the game, but I am having trouble copying him.
Does anyone have any tutorials or such for how stack object attributes works? Or suggestions on how to handle remembering a setting within the object? I've tried to look at some other objects with pie menus that toggles things, like ACR/Visitor controller, but they do it differently than Cyjonsand it's just making me confused.
Cyjons object has declared stack object attribute 2 as Interest Rate in text list Attribs. When you set interest rate via pie menu, the action bhav sets it to param 0. That's all it does. The guardian, from what I can tell, just adds the pie menu options. It does grey out the value corresponding to what stack object 2 is set to, which is done by setting local 0 to 1, and local 1 to stack object attribute 2, and then comparing them. If nothing it adds 1 to local 0 and tries again, until it reaches max interest. When it adds interest it multiplies by stack object attribute 2. What I don't understand is how it's distinguishing from the 10 possible interest % rates. The only place I can see where it's checking attribute 2 to a value is in the guardian, but I don't get how it's then remembering that inside the Sub - Calculate interest.
Action BHAV
![[Image: jrfpll.jpg]]()
Guardian BHAV
![[Image: 33p8084.jpg]]()
Const 1001:0x02 is Min Interest Value, set to 1.
Const 1001:0x03 is Max Interest + 1, set to 10.
Calculate interest
![[Image: o558n8.jpg]]()
If anyone sees what I'm not seeing and can explain it to me I'd be very grateful, or if someone knows of a tutorial explaining how to set things from inside the game and have it remember them
I am attempting to tackle a modified version of Cyjons Loan Jar, where you can decide which days of the week it should charge interest. I made a functional object where you toggle it in a BCON, but I'd like to learn how to set it from inside the game to make it more user friendly. Cyjons original lets you set interest from inside the game, but I am having trouble copying him.
Does anyone have any tutorials or such for how stack object attributes works? Or suggestions on how to handle remembering a setting within the object? I've tried to look at some other objects with pie menus that toggles things, like ACR/Visitor controller, but they do it differently than Cyjonsand it's just making me confused.
Cyjons object has declared stack object attribute 2 as Interest Rate in text list Attribs. When you set interest rate via pie menu, the action bhav sets it to param 0. That's all it does. The guardian, from what I can tell, just adds the pie menu options. It does grey out the value corresponding to what stack object 2 is set to, which is done by setting local 0 to 1, and local 1 to stack object attribute 2, and then comparing them. If nothing it adds 1 to local 0 and tries again, until it reaches max interest. When it adds interest it multiplies by stack object attribute 2. What I don't understand is how it's distinguishing from the 10 possible interest % rates. The only place I can see where it's checking attribute 2 to a value is in the guardian, but I don't get how it's then remembering that inside the Sub - Calculate interest.
Action BHAV
![[Image: jrfpll.jpg]](http://i63.tinypic.com/jrfpll.jpg)
Guardian BHAV
![[Image: 33p8084.jpg]](http://i67.tinypic.com/33p8084.jpg)
Const 1001:0x02 is Min Interest Value, set to 1.
Const 1001:0x03 is Max Interest + 1, set to 10.
Calculate interest
![[Image: o558n8.jpg]](http://i66.tinypic.com/o558n8.jpg)
If anyone sees what I'm not seeing and can explain it to me I'd be very grateful, or if someone knows of a tutorial explaining how to set things from inside the game and have it remember them
