Difference between 1 and 11 ?

Hi,
I'm making a game but i have a little problem. I made a question spawner like : 5+4 = and if i press 9 it's says congratulations ... so it's ok.
The problem is : if the question is 11 i can't press 1 two times.
Someone can help me ?
see ya
bob
I'm making a game but i have a little problem. I made a question spawner like : 5+4 = and if i press 9 it's says congratulations ... so it's ok.
The problem is : if the question is 11 i can't press 1 two times.
Someone can help me ?
see ya
bob
Comments
_________________________________
http://www.gamesaladforum.com/
http://gshelper.com/
_____________________________
http://gshelper.com/
http://www.gamesaladforum.com/
Answer attribute equals attribute Tens plus attribute singles.
First number pressed can be assigned to the Singles. If equals/Answer pressed then compare Answer with spawned number. If number pressed again then tens equals singles times ten and singles equals the new number.
thanks for your answer but i'm new with gamesalad so it's quiet hard :P
My games works perfectly with a random(1,9) i made 2 attributes
1) number
when touch 1 is pressed then game.number = 1
when touch 2 is pressed then game.number = 2
...
2) question change attribute game.question to random(1,9)
finally
when game.question = game.number then display text : "congratulations " You think your method could work ?
See ya Bob
Just a thought - it seems clear in my head!
____________________________________________________________________
Music for your Games
Track #1 for sale - 33% off
thx for your answer. I'm trying your solution but i don t know how to proceed...
especially with this function
first keypress x 10 + 2nd keypress.
I made a small number pad and when i press a button : the attribute's value changes like if i press 1 the value of the attribute is 1.
So... with your solution :
when actor receives event touch is pressed
change attribute
change attribute : game.number to (for example 1)
Where do you put your function first keypress x 10 + 2nd keypress ?
And my rule to show the answer is :
when attribute game.question = game.number
display text
text: game.number
I really don't understand maybe because i spent my all day on this function :P
see ya
Bob
then change game.answer to ((selfTimesTouched-1)*10)+1
Note: I have the Equals button reseting everything to zero after 3 seconds so you can try various combinations to see it work.
Hope it helps.
I tried your method scitunes but nothing happens ... i'm still looking for a solution :P
thx
see ya
bob
I can't load your game. I tried the others and they are working. Can you send me the game or have you an other solution ?
I tried to load the game with 2 macs.
See ya and thx
bob
Does anyone else see it and can verify it can be downloaded?
You need to open GameSalad Creator (the program you use to make games). Once opened go File>New and use the search box the has 'Filter' in it. type in Simple Calculator .. wait ... wait a bit more. Then it will come up. Double click your mouse on the icon that says 'How to by simo103' (make sure you Double click) .. and it should open the project on your computer. You can then go File>Save and save it to your Mac. Then poke around ... it should work fine if you are on the latest GS version.
(Also please someone else let me know it works so I know the file is okay and that I'm not wasting devilios' time ..thanks)
thanks so much it's just what i wanted !
thanks
see ya
BOB