Infinite attributes!

3absh3absh Member, PRO Posts: 595

My game is a roguelite, basically a game that never ends.

so I have this certain attribute for an actor, let's call it "rank"

This "rank" changes from level 1 to level 2


what I'm trying to do is save "rank" in an attribute that has the level in it, so that when "rank" is loaded it will load according to what level player is in.


Say player achieved rank 5 in level 1 but only rank 4 in level 2,

when he goes back to level 1, rank should be loaded again as 5 instead of 4. and when he goes to level 2 it should be loaded as 4 again.


I'm trying to avoid making a large table using this method.

Comments

  • 3absh3absh Member, PRO Posts: 595
    edited September 22

    Basically what I want is

    avrilrank1 to be loaded into actor X for level 1

    avrilrank2 to be loaded into actor X for level 2


    and so on..


    P.S I just tried it now, it works!!

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 1,962

    You should consider using a table for that. Each row of the table could represent the level and the first column could represent the rank.

    Then you'd just need one game level attribute to hold the current level and one for the current rank. Use Change Attribute and a table function to load the rank value from the corresponding row in the table whenever you change levels.

  • nir3112nir3112 Member, PRO Posts: 229

    you have to do it with table, you don't need large table just add the "Add/Remove Row" behavior and save the table.

    so the game will do everything for you...

    create two columns one for level and one for rank

    and just one row and from here just make the code.

    hope it helps[=

Sign In or Register to comment.