GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to assign actors with tables?

I have a current table with boolean values (for each level; True and False).

I can't figure out how you assign an actor to use a table. I am trying to add levels, where you have to complete a level before the next level will unlock. Does anyone know what rule or behavior to use to get this to work?

Thanks!

Comments

  • ShmirlyWhirlShmirlyWhirl Posts: 189Member, PRO
    Are you trying to get an actor to modify a table value?

    If thats the case, Change Table Value is what you are looking for. The fields are pretty self explanatory.
  • VoltzStudiosVoltzStudios Posts: 38Member
    I figured out how to do that.

    I have a table and a FinishedLevel actor. I have it so that when my main actor touches that FinishedLevel actor, it displays text "Win!" and changes the level value to "true" indicating you finished the level. I am wondering how to set up a level menu where you can only play level 2 if you beat level 1.
    I am doing each level through an actor which I want to remain locked until the previous level is beat.

    Any other help?
    Thanks.
  • VoltzStudiosVoltzStudios Posts: 38Member
    So basically, I have a table called "LevelsComplete" and I have a level1 actor that takes you to level 1, and once you complete it, it takes you back to the main screen where you can select the next level (Which is where I am trying to get it to unlock once level1 is complete).

    I am using the Windows version of GameSalad until I get a mac, if that makes a difference.
  • ShmirlyWhirlShmirlyWhirl Posts: 189Member, PRO
    Assuming you have a bunch of individual blocks on your level selection screen (a la angry birds) give them a new attribute. Let's call it level. Then, give each actor its level value (1,2,3 etc.). The you want to track which is the highest level the player has beat. Make another attribute (or table cell, if you are so inclined) call it Level_Unlock. Then, when a player beats a level, have it check to see if the value in Level_Unlock is less than the current level, if it is, change it to the current level. Back to the level selection actors- have the actors check to see if Level_Unlock +1 is greater than or equal to their level attribute. If so, unlock it. If not, do nothing.

    Let me know if thats too confusing. I am not always the best at explaining my idea's concisely.
  • VoltzStudiosVoltzStudios Posts: 38Member
    It makes sense, but which rule should I use for the actor to check to see if Level_Unlock is +1 greater than or equal to their level attribute?
  • VoltzStudiosVoltzStudios Posts: 38Member
    Wait, nevermind. I got it. Thanks!
Sign In or Register to comment.