Gamesalad Mission Achievement Help.

MattcusMattcus Member Posts: 85
edited August 2013 in Working with GS (Mac)
Hi, In my game I would like a mission system, where you do certain tasks to be able to level up.(such as earn 100 coins in one game) I want to have it so that, you can only complete 1 mission at a time, once you have completed that one, when you lose the game and go to the game over screen, it gives you another mission to complete. (Similar to Jetpack Joyride's system, but with only 1 mission at a time, not 3)

However, since you can't access a table value in the first part of a rule, I am not sure how to do this. Would the only solution be to have heaps of attributes, because that would get really confusing, really quickly.

If anyone has any suggestions on how to do this, please post a reply, I would greatly appreciate it.

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    You can access a table value in the first part of a rule if right outside it you set the table value into a game attribute, then use the game attribute in the rule. This is how I currently check table values.
  • MattcusMattcus Member Posts: 85
    edited August 2013
    I know, but then I would need, an attribute for every achievement. Is there any way around this?
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited August 2013
    I did partly read in a post here that one of the nightly builds had looping through table rows introduced so maybe that would be what you need if it makes it into to the next stable release.

    This does however sound like a similar question I saw last week or so where someone wanted to only see words that haven't already been used. I posted an example file where it randomly picked words from a copy table that only contained words that haven't been used. And that copy table was reduced by one each time. You could do the same with achievements.

    I don't know why the attachment isn't on the post anymore (I'm guessing they clear out old attachments for space reasons) but I can upload it to this post later tonight if you haven't solved it before then.

    http://forums.gamesalad.com/discussion/comment/411969

    EDIT: Actually it'll have to be tomorrow as I'm not home later.
  • MattcusMattcus Member Posts: 85
    I read the posts on the other discussion, but It's confusing. If you could upload that attachment, it would be really helpful.
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    Yeah that's cool, although I won't be able to do so until tomorrow, unless @1LuVP4nc4k3S still has a copy saved and is happy to upload it sooner.
  • MattcusMattcus Member Posts: 85
    That's fine, I'll keep working on it myself until then
  • 1LuVP4nc4k3S1LuVP4nc4k3S Member Posts: 62
    Hi guys, Kevin's example helped so much so I'd really like to help you with the zip he gave me.

    Although, can anyone tell me how? I've tried dragging it into the message I'm writing right now but it just tries to redownload it??

    Thanks
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    @1LuVP4nc4k3S, right below the comment box is an "Attach a file link".
  • BoomshackBarryBoomshackBarry Member Posts: 712
    You only get that attach file link if you're a pro user, otherwise you'll need to upload it somewhere (like dropbox) and share the link.
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    Oh right. Ok well if 1LuVP4nc4k3S hasn't got a way to share it I'll definitely upload it tomorrow.
  • 1LuVP4nc4k3S1LuVP4nc4k3S Member Posts: 62
    hmmm, sorry to be silly here but the only buttons I have are 'Forums', 'Working with GameSalad', 'Preview', 'Edit', 'Save Draft' and 'Post Comment'
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited August 2013
    Here's the example GameSalad project I promised to send. It picks a word that hasn't already been used, but hopefully you can see how you might be able to do the same with two tables to pick random missions that haven't already been completed.

  • MattcusMattcus Member Posts: 85
    Thanks for the project, could you explain how it works, because it's a bit confusing.
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    There's two tables, one with 10 words (which could be your missions) and a blank table. When the game first starts I.e. level 1 the words table is copied into the blank table, so the blank table now contains all 10 words. I'm now going to refer to this as the copy table.

    When you press the get word button at the bottom of the screen 1 word is selected from the copy table randomly, displayed at the top and then deleted from the copy table so that it's not selected again, and the level counter is increased by one.

    Once you've pressed the get word button 10 or 11 times and there's no more rows in the copy table, the level is reset to 1 and the master words table is copied again, giving you the same 10 words to pick randomly from again.

    This is how you could possibly pick your missions randomly without ever picking the same one. Obviously when the player has played all the missions and there's no more to choose from in the copy table you will need to decide if you want all missions reset so that they can do them all again, of if they need to start a new game completely.

    Apologies about the lack of comments in the project.

    I will redo it at a later date and place on my site in case it's deleted from this post again.
  • MattcusMattcus Member Posts: 85
    I've been working on the system, but it doesn't seem to be working properly. I'm trying to make it spawn at the end of the level when they have completed the mission(which works fine) then give the player a prize(Which works fine), then show a new mission, Which doesn't work. Would you be able to see why? I'll post some pictures here:

    image

    image

    image

    image

    image
Sign In or Register to comment.