Help with saving points and in-game store

JordeyyJordeyy Member Posts: 409
edited February 2013 in Working with GS (Mac)
Hello Everyone i was just wondering, how you would go about making a , "Points To Upgrade" method

For example , Say i jump 1000 meters, and it gives me 100 coins, how could i make it save these coins , and also keep adding to them

so instead of just starting back at zero when i take another jump , i want them to stay at what they was last jump , and then my next jump, i want the coins earned in this jump added to them

so i can spend this on upgrades

if i didn't explain it clear enough please just say

Comments

  • PaxPaxPaxPax Member Posts: 106
    I think I understand. You start at 0 coins and every time you get more coins you want to add the coins to allow you to have a running total. Create a game attribute- total coins or something like that. Every time you collect coins change the game attribute total coins to total coins plus the number of coins you just collected. Hope this is what you were looking for. :)
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Take a look at this video. It's about keeping score, but it applies to anything that you want to keep track of, and continuously add to, without it resetting to zero.



    And if you haven't already, or if you didn't know, there are tons of videos on how to use GameSalad. Here are a few links to check out, if you haven't already.

    http://www.youtube.com/user/GameSaladCookbook/videos?flow=grid&view=0

    http://www.gshelper.com

    http://gleesongroupmedia.com/gsguide/gsguide.html
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Videos are your friends.
  • JordeyyJordeyy Member Posts: 409
    @Braydon_SFX ino bro , ive watched alot now to be fair :)
  • JordeyyJordeyy Member Posts: 409

    @SlickZero i check that tutorial , and it was not what i had in mind,

    what i was thinking is this, i will show you my rules

    this is how my score system works

    http://gyazo.com/4182335273fa3d3deddbb67f35d89d46
    That Calculates how far i jumped

    Next to this score i have got a coins score , it divided my distance by 12 , so i get what ever score distance, divided by 12

    http://gyazo.com/9f615a11a694386c0db50392dc61920b

    for the custom font i have got this setup
    http://gyazo.com/b4929b27c22812c3def400b1e8b9cd0d

    how would i save the coins , so i can keep saving them up , to buy stuff ?
  • PaxPaxPaxPax Member Posts: 106
    Hard to tell from your screen shots so I could be way off. Assuming you are trying to keep a tally of the number of 'scores/coins' you have collected than you need a 'running or total score' . Every time you 'score', add this score to your 'running/total score'. Running/total score starts at zero. Change running/total score attribute to= running/total score + score. The 'running score' now holds the total number of scores/coins collected.

    Again, may be way off but hopefully this helps.

    Cheers
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Dude I also showed you how to embed pictures yesterday ... If you want this much help, take the advice given. Watch lots of videos, read lots of threads and embed your pictures into your posts .. Make it easy for people to help you! Personally I rarely click external links, if you cant be bothered to learn how to put your pictures in your posts (even after being told yesterday by me and riffel), I cant be bothered to help.

    I'm not just saying it to be an arse, honest, good luck!
  • JordeyyJordeyy Member Posts: 409
    @beefy_clyro i tried for about 20 mins to embed the picture but it didnt work, it didnt even work when your tried if you remember. i went on tinypic , and also searched google on how to , embed my image into a forum post,and it didnt work bro
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    NO!

    It did not work because it had a symbol in which you were told to delete;

    Simply take the below and delete the $ and the space after the opening <

    < $img src = "http://gyazo.com/4182335273fa3d3deddbb67f35d89d46.png"/img>

    That will give you this result;

    image

    Just use the above format but put the < at the start of it all
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    image

    This is the end result.

    If you still cannot figure it out, press quote to this comment and you will see the format i'm using
  • JordeyyJordeyy Member Posts: 409
    I want to make an in-game store, to enable the user to upgrade his bike ,

    im trying to make a method were i , jump off a ram on my bike, jump say 2300 meters , then divide that by 12 and add it to my coins, which can be saved up and spent on upgrades

    here are my rules what am i doing wrong, cause it dont add the coins up it just keeps changing them , to how many i earned that jump

    image

    image


    in the first screenshot it shows , my method to turn my score , into coins by dividing it by 12

    the second image shows , how my custom font is setup , could anyone help me with this please :) thanks


  • PBEmpirePBEmpire Member Posts: 676
    didnt you open another thread about this?? Use that and dont open another thread. People will not bother answering you this way.
    http://forums.gamesalad.com/discussion/54256/help-with-saving-points-method#latest
  • JordeyyJordeyy Member Posts: 409
    It was a different way of asking my question also I embedded the images into this one
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @Jordeyy you have created multiple threads for the same issue more than once. It's great that you're making so much progress on your game and you obviously have many questions as you're learning GameSalad, but it's not working to have so many threads. Perhaps you can just use this thread for any new issues that arise about your game?

    [merged threads and edited title]
  • JordeyyJordeyy Member Posts: 409
    Bump (sorry im just wondering if anyone else has got any idea on how to do this :)
  • PaxPaxPaxPax Member Posts: 106
    From what I understand your question to be, the above video shows you how to do it.
    If you can give more info on the details of your attributes; money, coins and score and how they get their values that may help. Is your constrain game coins to game score attribute supposed to be a change attribute? I cannot tell from what i see. Not sure what else i can do to help.
  • JordeyyJordeyy Member Posts: 409
    @PaxPax but the video shows how to , shoot something and gain points ,

    but i want to to make it so , my distance i traveled , gets divided by 12 , then added to my coins

    so i can later upgrade my bike. To get my score i am using this formula

    "Floor(game.EndX-game.StartX)

    Constrain attribute game.score to "Floor(game.EndX-game.StartX)

    This gives me the the distance were i landed , subtracting were i started

    so normally about minimum 1000 meters max 4000 meters

    i want to divide that by 12 , and add it to my coins each round

    at the moment i jump and it divides it by 12 , gives me about 80 coins but then ,when i click restart to jump again and jump off the ramp , it adds about 1000 points, so it doesn't divide the score

    to get the coins i use this formula

    constrain "game.Money to game.Money+game.Score"

    change attribute "game.Money to game.Money/12

    here is my game see if you understand what i mean
  • JordeyyJordeyy Member Posts: 409
    @paxpax ^^^^^
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2013
    Jordeyy, you don't need to notify someone more than once. That just sends two email messages to the person, which is annoying in my opinion.
  • JordeyyJordeyy Member Posts: 409
    @tatiang ok sorry bro i just cant find a way , to do what im trying to do
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    As I wrote privately to you, please be patient. Expecting an answer in about an hour is unrealistic. People tend to be very generous with their help here but if you expect too much, too fast, you'll quickly outgrow your welcome.

    I think it's reasonable to bump a thread if six hours or more have gone by and you've haven't received a response. I also think it's best to post additional information (e.g. a screenshot, other algorithm-related information, a video, a sketch, etc.) instead of just writing "bump" or "anyone???" or things along those lines.
  • JordeyyJordeyy Member Posts: 409
    @tatiang ok bro sorry it wont happen again
Sign In or Register to comment.