How do i fix this bug ?

  • I've been recently developing a turn based RPG in construct 2 . Im currently trying to make a working buff/debuff system ( that lasts multiple rounds ) .

    The way i want it to work is : When the player activates a buff that lasts for 3 rounds , for example , the system will create an icon right below his HP/MP bar , representing the icon of the ability .

    Then , for every buff/debuff slot , there will be an text object below them . Each one of them would always represent the amount of rounds lasting on the corresponding buff/debuff above them .

    For ex : Player uses "Defensive Stance" , lasting for 2 rounds .

    If the first buff/debuff slot was available , then it would set its sprite to be the same as the icon of Defensive Stance , and the text below it would show "2" , meaning that there is 2 rounds left before the ability expires .

    Problem is : I have no ideia how to correlate each text with each buff slot . What i tried to do was : Every text had an instance variable that would check to which slot it belonged to . So , if a text had this variable set to 1 , then it belongs to the first slot , if its set to 2 , then it belongs to the second slot , etc ...

    Then , all of the slots would also have an instance variable to correlate with the text , and an instance variable defining how many rounds last before the effect fades .

    So , in theory , the text that had its variable set to 1 , would correlate to the amounts of rounds that the buff/debuff slot = 1 has .

    the text that had its variable set to 2 , would correlate to the amounts of rounds that the buff/debuff slot = 2 has , and etc ..

    But this doesn't seem to work at all . I've ran out of ideas . Any help ?

    ( sorry for bad english , i am brazillian )

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)