Detecting change of an attribute...?
L1Wulf
Member Posts: 4
in Help Wanted
Alright then, so just to have some context, I'm tryin to make an RPG, so there's Levels and spendable Skill points gained every level.
Problem is, I dunno how to program it so that I add a certain number of points everytime my character levels up. Like, I wanna add 3 skill points every time my level goes up by one, but I dunno how to.
I can't constrain attribute cus it'd mean the number of points wouldn't decrease when they're spent, and I dunno any other viable way.
Thanks for the help, whoever sees and answers this
Comments
In whatever you are using to make your level go up by one - include Change skill to skill+1
Sry mate, don't think it'll work. Cus I hav levels constrained to another attribute
When that other attribute goes up then Change skill to skill+1
So how would I set it so it'd detect that change?
@chanedwin2007@yahoo.com.sg You might try Change Attribute instead of Constrain Attribute.
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
Actually, you'll need to constrain game.skill to game.level*3 (assuming skill points can never be lost).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang But he wants his skill points to decrease when spent.
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
Oh right... missed this:
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
So what @Socks said is still relevant:
Although you might want +3.
How exactly are you changing the value of game.level?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Figured it out. Thanks guys.
Actually had levels constraint to exp, such that it was one hundredth of my exp value. Changed it out so that once my exp reached 100 it'd add one to level, three to skills and reset itself to 0.
Thanks for the help y'all