adding with gamesalad

alexxxhpalexxxhp Member Posts: 161
edited November -1 in Tech Support
how do you make numbers add on their own showing the result for example
if a number 4 comes up on the screen then a 3 then show a final result of 7 but at random numbers as the numbers change to show the final result of those numbers added

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    You need to make global game attributes which hold those first two numbers.

    So:
    Number1
    Number2

    In your game, whenever you set those two numbers, change the corresponding global attribute as well.

    When you show the results, use the expression editor (the little e) and make it look like this:

    Display Text
    game.Number1 + game.Number2

    Hope this helps!
    Joe
  • alexxxhpalexxxhp Member Posts: 161
    That did help thanks.. I am making a card game how do you make the game give a card when I request a card with a button for example if click give me a card actor it gives me a card but I can only press it once and thats it I want to make multiple press so every time I press it it gives me a card not just one its like the actor disables after I touch it once
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    im guessing the attributes only have set numbers. i would assume you need to tell number1 and 2 attributes that it can have random numbers between your desired range. Therefore everytime the button is pressed it can call upon any numbers between say 1-10 and then you have the maths above to add it up and display the answer. Try to play with the random option in the epxression editor where you then set (min,max) numbers, therefore you'll set random(1,10). This is only a guess, i havent tested so may not help.
Sign In or Register to comment.