Detecting change of an attribute...?

L1WulfL1Wulf Member Posts: 4

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 :smile:

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    @chanedwin2007@yahoo.com.sg said:
    I wanna add 3 skill points every time my level goes up by one.

    In whatever you are using to make your level go up by one - include Change skill to skill+1

  • L1WulfL1Wulf Member Posts: 4

    Sry mate, don't think it'll work. Cus I hav levels constrained to another attribute

  • SocksSocks London, UK.Member Posts: 12,822

    @chanedwin2007@yahoo.com.sg said:
    I hav levels constrained to another attribute

    When that other attribute goes up then Change skill to skill+1

  • L1WulfL1Wulf Member Posts: 4

    So how would I set it so it'd detect that change?

  • SummationSummation Member, PRO Posts: 476

    @chanedwin2007@yahoo.com.sg You might try Change Attribute instead of Constrain Attribute.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Actually, you'll need to constrain game.skill to game.level*3 (assuming skill points can never be lost).

  • SummationSummation Member, PRO Posts: 476

    @tatiang But he wants his skill points to decrease when spent.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Oh right... missed this:

    spendable Skill points gained every level.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    So what @Socks said is still relevant:

    In whatever you are using to make your level go up by one - include Change skill to skill+1

    Although you might want +3.

    How exactly are you changing the value of game.level?

  • L1WulfL1Wulf Member Posts: 4

    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 :D

Sign In or Register to comment.